2 types derived from CacheItem
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
11private sealed class ImmutableCacheItem<T> : CacheItem<T> // used to hold types that do not require defensive copies
Internal\DefaultHybridCache.MutableCacheItem.cs (1)
11private sealed partial class MutableCacheItem<T> : CacheItem<T> // used to hold types that require defensive copies
18 references to CacheItem
Microsoft.Extensions.Caching.Hybrid (18)
Internal\DefaultHybridCache.CacheItem.cs (1)
115internal static CacheItem<T> Create() => ImmutableTypeCache<T>.IsImmutable ? new ImmutableCacheItem<T>() : new MutableCacheItem<T>();
Internal\DefaultHybridCache.cs (1)
137&& untyped is CacheItem<T> typed && typed.TryGetValue(_logger, out var value))
Internal\DefaultHybridCache.L2.cs (1)
97internal void SetL1<T>(string key, CacheItem<T> value, HybridCacheEntryOptions? options)
Internal\DefaultHybridCache.Stampede.cs (1)
60&& untyped is CacheItem<T> typed && typed.TryReserve())
Internal\DefaultHybridCache.StampedeStateT.cs (14)
21private readonly TaskCompletionSource<CacheItem<T>>? _result; 28internal void SetResultDirect(CacheItem<T> value) 32: base(cache, key, CacheItem<T>.Create(), canBeCanceled) 38: base(cache, key, CacheItem<T>.Create(), token) 95CacheItem<T> result; 122public Task<CacheItem<T>> Task 129static Task<CacheItem<T>> InvalidAsync() => System.Threading.Tasks.Task.FromException<CacheItem<T>>( 155static async Task<T> AwaitedAsync(ILogger log, Task<CacheItem<T>> task) 160private static CacheItem<T> ThrowUnexpectedCacheItem() => throw new InvalidOperationException("Unexpected cache item"); 381CacheItem<T> cacheItem; 409CacheItem<T> cacheItem; 429CacheItem<T> cacheItem; 461private void SetResult(CacheItem<T> value)