20 references to CacheFeatures
Microsoft.Extensions.Caching.Hybrid (20)
Internal\DefaultHybridCache.cs (10)
38
private readonly
CacheFeatures
_features; // used to avoid constant type-testing
57
internal
CacheFeatures
GetFeatures() => _features;
60
internal void DebugRemoveFeatures(
CacheFeatures
features) => Unsafe.AsRef(in _features) &= ~features;
63
private
CacheFeatures
GetFeatures(
CacheFeatures
mask) => _features & mask;
65
internal bool HasBackendCache => (_features &
CacheFeatures
.BackendCache) != 0;
88
IBufferDistributedCache =>
CacheFeatures
.BackendCache |
CacheFeatures
.BackendBuffers,
89
not null =>
CacheFeatures
.BackendCache,
90
_ =>
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