2 types derived from CacheItem
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
11
private sealed class ImmutableCacheItem<T> :
CacheItem
<T> // used to hold types that do not require defensive copies
Internal\DefaultHybridCache.MutableCacheItem.cs (1)
11
private 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)
115
internal 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)
97
internal 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)
21
private readonly TaskCompletionSource<
CacheItem
<T>>? _result;
28
internal void SetResultDirect(
CacheItem
<T> value)
32
: base(cache, key,
CacheItem
<T>.Create(), canBeCanceled)
38
: base(cache, key,
CacheItem
<T>.Create(), token)
95
CacheItem
<T> result;
122
public Task<
CacheItem
<T>> Task
129
static Task<
CacheItem
<T>> InvalidAsync() => System.Threading.Tasks.Task.FromException<
CacheItem
<T>>(
155
static async Task<T> AwaitedAsync(ILogger log, Task<
CacheItem
<T>> task)
160
private static
CacheItem
<T> ThrowUnexpectedCacheItem() => throw new InvalidOperationException("Unexpected cache item");
381
CacheItem
<T> cacheItem;
409
CacheItem
<T> cacheItem;
429
CacheItem
<T> cacheItem;
461
private void SetResult(
CacheItem
<T> value)