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