22 references to CacheFeatures
Microsoft.Extensions.Caching.Hybrid (20)
Internal\DefaultHybridCache.cs (10)
38private readonly CacheFeatures _features; // used to avoid constant type-testing 58internal CacheFeatures GetFeatures() => _features; 61internal void DebugRemoveFeatures(CacheFeatures features) => Unsafe.AsRef(in _features) &= ~features; 64private CacheFeatures GetFeatures(CacheFeatures mask) => _features & mask; 66internal bool HasBackendCache => (_features & CacheFeatures.BackendCache) != 0; 99IBufferDistributedCache => CacheFeatures.BackendCache | CacheFeatures.BackendBuffers, 100not null => CacheFeatures.BackendCache, 101_ => CacheFeatures.None
Internal\DefaultHybridCache.L2.cs (10)
27switch (GetFeatures(CacheFeatures.BackendCache | CacheFeatures.BackendBuffers)) 29case CacheFeatures.BackendCache: // legacy byte[]-based 44case CacheFeatures.BackendCache | CacheFeatures.BackendBuffers: // IBufferWriter<byte>-based 85switch (GetFeatures(CacheFeatures.BackendCache | CacheFeatures.BackendBuffers)) 87case CacheFeatures.BackendCache: // legacy byte[]-based 96case CacheFeatures.BackendCache | CacheFeatures.BackendBuffers: // ReadOnlySequence<byte>-based
Microsoft.Extensions.Caching.Hybrid.Tests (2)
BufferReleaseTests.cs (1)
122cache.DebugRemoveFeatures(CacheFeatures.BackendBuffers);
RedisTests.cs (1)
62cache.DebugRemoveFeatures(DefaultHybridCache.CacheFeatures.BackendBuffers);