1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 15:53:59 +00:00

Add FusionCache to service collection (#6575)

* Add FusionCache to service collection

* Refactored to it's own service collection extension, added full unit tests, added TryAdd style support

* Move to ExtendedCache instead of FusionCache, re-use exsting DistributedCache if present, expose backplane to DI

* Reworked builders to reuse multiplexer if present
This commit is contained in:
Brant DeBow
2025-11-14 12:45:45 -05:00
committed by GitHub
parent 9b3adf0ddc
commit b4c7ab8773
4 changed files with 277 additions and 0 deletions

View File

@@ -783,6 +783,19 @@ public class GlobalSettings : IGlobalSettings
{
public virtual IConnectionStringSettings Redis { get; set; } = new ConnectionStringSettings();
public virtual IConnectionStringSettings Cosmos { get; set; } = new ConnectionStringSettings();
public TimeSpan Duration { get; set; } = TimeSpan.FromMinutes(30);
public bool IsFailSafeEnabled { get; set; } = true;
public TimeSpan FailSafeMaxDuration { get; set; } = TimeSpan.FromHours(2);
public TimeSpan FailSafeThrottleDuration { get; set; } = TimeSpan.FromSeconds(30);
public float? EagerRefreshThreshold { get; set; } = 0.9f;
public TimeSpan FactorySoftTimeout { get; set; } = TimeSpan.FromMilliseconds(100);
public TimeSpan FactoryHardTimeout { get; set; } = TimeSpan.FromMilliseconds(1500);
public TimeSpan DistributedCacheSoftTimeout { get; set; } = TimeSpan.FromSeconds(1);
public TimeSpan DistributedCacheHardTimeout { get; set; } = TimeSpan.FromSeconds(2);
public bool AllowBackgroundDistributedCacheOperations { get; set; } = true;
public TimeSpan JitterMaxDuration { get; set; } = TimeSpan.FromSeconds(2);
public TimeSpan DistributedCacheCircuitBreakerDuration { get; set; } = TimeSpan.FromSeconds(30);
}
public class WebPushSettings : IWebPushSettings