2 writes to _backendCache
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (2)
77
_backendCache
= services.GetService<IDistributedCache>(); // note optional
85
_backendCache
= null;
12 references to _backendCache
Microsoft.Extensions.Caching.Hybrid (12)
Internal\DefaultHybridCache.cs (8)
81
if (
_backendCache
is not null
82
&&
_backendCache
.GetType() == typeof(MemoryDistributedCache)
89
_features |=
_backendCache
switch
108
if (
_backendCache
is null)
123
_globalInvalidateTimestamp =
_backendCache
is null ? _zeroTimestamp : SafeReadTagInvalidationAsync(TagSet.WildcardTag);
126
internal IDistributedCache? BackendCache =>
_backendCache
;
202
return
_backendCache
is null ? default : new(
_backendCache
.RemoveAsync(key, token));
Internal\DefaultHybridCache.L2.cs (4)
33
var pendingLegacy =
_backendCache
!.GetAsync(key, token);
48
var cache = Unsafe.As<IBufferDistributedCache>(
_backendCache
!); // type-checked already
97
return new(
_backendCache
!.SetAsync(key, arr, options, token));
99
var cache = Unsafe.As<IBufferDistributedCache>(
_backendCache
!); // type-checked already