2 writes to _backendCache
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (2)
70
_backendCache
= services.GetService<IDistributedCache>(); // note optional
78
_backendCache
= null;
11 references to _backendCache
Microsoft.Extensions.Caching.Hybrid (11)
Internal\DefaultHybridCache.cs (7)
74
if (
_backendCache
is not null
75
&&
_backendCache
.GetType() == typeof(MemoryDistributedCache)
82
_features |=
_backendCache
switch
101
if (
_backendCache
is null)
112
internal IDistributedCache? BackendCache =>
_backendCache
;
187
return
_backendCache
is null ? default : new(
_backendCache
.RemoveAsync(key, token));
Internal\DefaultHybridCache.L2.cs (4)
27
var pendingLegacy =
_backendCache
!.GetAsync(key, token);
42
var cache = Unsafe.As<IBufferDistributedCache>(
_backendCache
!); // type-checked already
88
return new(
_backendCache
!.SetAsync(key, arr, GetOptions(options), token));
90
var cache = Unsafe.As<IBufferDistributedCache>(
_backendCache
!); // type-checked already