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