30 references to HybridCacheEntryFlags
Microsoft.Extensions.Caching.Abstractions (1)
Hybrid\HybridCacheEntryOptions.cs (1)
31public HybridCacheEntryFlags? Flags { get; init; }
Microsoft.Extensions.Caching.Hybrid (23)
Internal\DefaultHybridCache.cs (10)
36private readonly HybridCacheEntryFlags _hardFlags; // *always* present (for example, because no L2) 37private readonly HybridCacheEntryFlags _defaultFlags; // note this already includes hardFlags 98_hardFlags |= HybridCacheEntryFlags.DisableDistributedCache; 101_defaultFlags = (defaultEntryOptions?.Flags ?? HybridCacheEntryFlags.None) | _hardFlags; 121var flags = GetEffectiveFlags(options); 122if ((flags & HybridCacheEntryFlags.DisableLocalCacheRead) == 0 && _localCache.TryGetValue(key, out var untyped) 162var flags = GetEffectiveFlags(options) | (HybridCacheEntryFlags.DisableLocalCacheRead | HybridCacheEntryFlags.DisableDistributedCacheRead); 168private HybridCacheEntryFlags GetEffectiveFlags(HybridCacheEntryOptions? options)
Internal\DefaultHybridCache.Stampede.cs (3)
16public bool GetOrCreateStampedeState<TState, T>(string key, HybridCacheEntryFlags flags, out StampedeState<TState, T> stampedeState, bool canBeCanceled) 59if ((flags & HybridCacheEntryFlags.DisableLocalCache) == 0 && _localCache.TryGetValue(key, out var untyped) 106internal int DebugGetCallerCount(string key, HybridCacheEntryFlags? flags = null)
Internal\DefaultHybridCache.StampedeKey.cs (3)
15private readonly HybridCacheEntryFlags _flags; 17public StampedeKey(string key, HybridCacheEntryFlags flags) 37public HybridCacheEntryFlags Flags => _flags;
Internal\DefaultHybridCache.StampedeStateT.cs (7)
17private const HybridCacheEntryFlags FlagsDisableL1AndL2 = HybridCacheEntryFlags.DisableLocalCacheWrite | HybridCacheEntryFlags.DisableDistributedCacheWrite; 167if ((Key.Flags & HybridCacheEntryFlags.DisableDistributedCacheRead) == 0) 179if ((Key.Flags & HybridCacheEntryFlags.DisableUnderlyingData) == 0) 228if ((Key.Flags & HybridCacheEntryFlags.DisableDistributedCacheWrite) == 0) 360if ((Key.Flags & HybridCacheEntryFlags.DisableLocalCacheWrite) == 0)
Microsoft.Extensions.Caching.Hybrid.Tests (6)
BufferReleaseTests.cs (1)
76private static readonly HybridCacheEntryOptions _noUnderlying = new() { Flags = HybridCacheEntryFlags.DisableUnderlyingData };
L2Tests.cs (1)
24private static readonly HybridCacheEntryOptions _expiryNoL1 = new() { Flags = HybridCacheEntryFlags.DisableLocalCache, Expiration = TimeSpan.FromMinutes(3.5) };
ServiceConstructionTests.cs (2)
41options.DefaultEntryOptions = new() { Expiration = TimeSpan.FromSeconds(120), Flags = HybridCacheEntryFlags.DisableLocalCacheRead }; 50Assert.Equal(HybridCacheEntryFlags.DisableLocalCacheRead, defaults.Flags);
StampedeTests.cs (2)
24Flags = HybridCacheEntryFlags.DisableDistributedCache | HybridCacheEntryFlags.DisableLocalCache