3 instantiations of StampedeKey
Microsoft.Extensions.Caching.Hybrid (3)
Internal\DefaultHybridCache.cs (1)
163
var state = new StampedeState<T, T>(this, new
StampedeKey
(key, flags), token);
Internal\DefaultHybridCache.Stampede.cs (2)
18
var stampedeKey = new
StampedeKey
(key, flags);
108
var stampedeKey = new
StampedeKey
(key, flags ?? _defaultFlags);
15 references to StampedeKey
Microsoft.Extensions.Caching.Hybrid (15)
Internal\DefaultHybridCache.Stampede.cs (4)
13
private readonly ConcurrentDictionary<
StampedeKey
, StampedeState> _currentOperations = new();
18
var
stampedeKey = new StampedeKey(key, flags);
72
static bool TryJoinExistingSession(DefaultHybridCache @this, in
StampedeKey
stampedeKey,
108
var
stampedeKey = new StampedeKey(key, flags ?? _defaultFlags);
Internal\DefaultHybridCache.StampedeKey.cs (3)
12
internal readonly struct StampedeKey : IEquatable<
StampedeKey
>
45
public bool Equals(
StampedeKey
other) => _flags == other._flags & _key == other._key;
48
=> obj is
StampedeKey
other && Equals(other);
Internal\DefaultHybridCache.StampedeState.cs (5)
33
private readonly
StampedeKey
_key;
34
public ref readonly
StampedeKey
Key => ref _key;
40
protected StampedeState(DefaultHybridCache cache, in
StampedeKey
key, CacheItem cacheItem, bool canBeCanceled)
61
protected StampedeState(DefaultHybridCache cache, in
StampedeKey
key, CacheItem cacheItem, CancellationToken token)
101
private void RemoveStampedeState(in
StampedeKey
key)
Internal\DefaultHybridCache.StampedeStateT.cs (2)
29
public StampedeState(DefaultHybridCache cache, in
StampedeKey
key, bool canBeCanceled)
35
public StampedeState(DefaultHybridCache cache, in
StampedeKey
key, CancellationToken token)
Internal\DefaultHybridCache.SyncLock.cs (1)
33
internal object GetPartitionedSyncLock(in
StampedeKey
key) => (key.HashCode & 0b111) switch // generate 8 partitions using the low 3 bits