20 references to CacheFeatures
Microsoft.Extensions.Caching.Hybrid (20)
Internal\DefaultHybridCache.cs (10)
41
private readonly
CacheFeatures
_features; // used to avoid constant type-testing
60
internal
CacheFeatures
GetFeatures() => _features;
63
internal void DebugRemoveFeatures(
CacheFeatures
features) => Unsafe.AsRef(in _features) &= ~features;
66
private
CacheFeatures
GetFeatures(
CacheFeatures
mask) => _features & mask;
68
internal bool HasBackendCache => (_features &
CacheFeatures
.BackendCache) != 0;
91
IBufferDistributedCache =>
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers,
92
not null =>
CacheFeatures
.BackendCache,
93
_ =>
CacheFeatures
.None
Internal\DefaultHybridCache.L2.cs (10)
29
switch (GetFeatures(
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers))
31
case
CacheFeatures
.BackendCache: // legacy byte[]-based
46
case
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers: // IBufferWriter<byte>-based
87
switch (GetFeatures(
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers))
89
case
CacheFeatures
.BackendCache: // legacy byte[]-based
98
case
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers: // ReadOnlySequence<byte>-based