15 instantiations of HybridCacheEntryOptions
Microsoft.AspNetCore.Components.Endpoints (1)
CacheView\HybridCacheViewStore.cs (1)
71return new HybridCacheEntryOptions
Microsoft.AspNetCore.Components.Server (2)
Circuits\HybridCacheCircuitPersistenceProvider.cs (2)
31_cacheWriteOptions = new HybridCacheEntryOptions 36_cacheReadOptions = new HybridCacheEntryOptions
Microsoft.Extensions.Caching.Abstractions (3)
Hybrid\HybridCache.cs (2)
198private static readonly HybridCacheEntryOptions s_writesDisabled = new() 208return new HybridCacheEntryOptions
Hybrid\HybridCacheEntryContext.cs (1)
144=> new HybridCacheEntryOptions
Microsoft.Extensions.Caching.Hybrid.Tests (9)
BufferReleaseTests.cs (1)
83private static readonly HybridCacheEntryOptions _noUnderlying = new() { Flags = HybridCacheEntryFlags.DisableUnderlyingData };
ExpirationTests.cs (1)
28HybridCacheEntryOptions options = new() { Expiration = TimeSpan.FromMinutes(2), LocalCacheExpiration = TimeSpan.FromMinutes(1) };
L2Tests.cs (2)
23private static readonly HybridCacheEntryOptions _expiry = new() { Expiration = TimeSpan.FromMinutes(3.5) }; 25private static readonly HybridCacheEntryOptions _expiryNoL1 = new() { Flags = HybridCacheEntryFlags.DisableLocalCache, Expiration = TimeSpan.FromMinutes(3.5) };
ServiceConstructionTests.cs (3)
42options.DefaultEntryOptions = new() { Expiration = TimeSpan.FromSeconds(120), Flags = HybridCacheEntryFlags.DisableLocalCacheRead }; 594options.DefaultEntryOptions = new() 609itemOptions = new()
StampedeTests.cs (1)
22options.DefaultEntryOptions = new()
UnreliableL2Tests.cs (1)
111private static HybridCacheEntryOptions NoL2Write { get; } = new HybridCacheEntryOptions { Flags = HybridCacheEntryFlags.DisableDistributedCacheWrite };
52 references to HybridCacheEntryOptions
Microsoft.AspNetCore.Components.Endpoints (2)
CacheView\HybridCacheViewStore.cs (2)
26var hybridOptions = BuildHybridOptions(options); 53private static HybridCacheEntryOptions BuildHybridOptions(CacheStoreOptions options)
Microsoft.AspNetCore.Components.Server (2)
Circuits\HybridCacheCircuitPersistenceProvider.cs (2)
21private readonly HybridCacheEntryOptions _cacheWriteOptions; 22private readonly HybridCacheEntryOptions _cacheReadOptions;
Microsoft.Extensions.Caching.Abstractions (24)
Hybrid\HybridCache.cs (20)
33HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default); 46HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 63HybridCacheEntryOptions? options = null, 85HybridCacheEntryOptions? options = null, 103HybridCacheEntryOptions? options = null, 125HybridCacheEntryOptions? options = null, 146HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 157HybridCacheEntryOptions innerOptions = options is null 182HybridCacheEntryOptions? writeOptions = context.Revision == 0 198private static readonly HybridCacheEntryOptions s_writesDisabled = new() 203private static HybridCacheEntryOptions CloneWithWritesDisabled(HybridCacheEntryOptions options) 229HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 246HybridCacheEntryOptions? options = null, 267HybridCacheEntryOptions? options = null, 285HybridCacheEntryOptions? options = null, 307HybridCacheEntryOptions? options = null, 333public readonly HybridCacheEntryOptions? Options; 338public DefaultImplState(TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 361public abstract ValueTask SetAsync<T>(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default);
Hybrid\HybridCacheEntryContext.cs (3)
16/// A context constructed directly reflects only whatever <see cref="HybridCacheEntryOptions"/> were supplied to 33public HybridCacheEntryContext(HybridCacheEntryOptions? options) 143internal HybridCacheEntryOptions ToOptions()
Hybrid\HybridCacheEntryOptions.cs (1)
17/// <see cref="HybridCache.GetOrCreateAsync{TState, T}(string, TState, Func{TState, HybridCacheEntryContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask{T}}, HybridCacheEntryOptions?, System.Collections.Generic.IEnumerable{string}?, System.Threading.CancellationToken)"/>
Microsoft.Extensions.Caching.Hybrid (16)
HybridCacheOptions.cs (1)
21public HybridCacheEntryOptions? DefaultEntryOptions { get; set; }
Internal\DefaultHybridCache.cs (7)
113HybridCacheEntryOptions? defaultEntryOptions = _options.DefaultEntryOptions; 139HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 212public override ValueTask SetAsync<T>(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken token = default) 222internal TimeSpan GetL1AbsoluteExpirationRelativeToNow(HybridCacheEntryOptions? options) 225internal TimeSpan GetL2AbsoluteExpirationRelativeToNow(HybridCacheEntryOptions? options) => options?.Expiration ?? _defaultExpiration; 228internal HybridCacheEntryFlags GetEffectiveFlags(HybridCacheEntryOptions? options) 239private static TimeSpan? GetEffectiveLocalCacheExpiration(HybridCacheEntryOptions? options)
Internal\DefaultHybridCache.L2.cs (5)
79internal ValueTask SetL2Async(string key, CacheItem cacheItem, in BufferChunk buffer, HybridCacheEntryOptions? options, CancellationToken token) 179internal void SetL1<T>(string key, CacheItem<T> value, HybridCacheEntryOptions? options, TimeSpan maxRelativeTime) 221private async ValueTask WritePayloadAsync(string key, CacheItem cacheItem, BufferChunk payload, HybridCacheEntryOptions? options, CancellationToken token) 258private DistributedCacheEntryOptions GetL2DistributedCacheOptions(HybridCacheEntryOptions? options) 279static DistributedCacheEntryOptions ToDistributedCacheEntryOptions(HybridCacheEntryOptions options)
Internal\DefaultHybridCache.StampedeStateT.cs (3)
26private HybridCacheEntryOptions? _options; 47public void QueueUserWorkItem(in TState state, Func<TState, CancellationToken, ValueTask<T>> underlying, HybridCacheEntryOptions? options) 65public Task ExecuteDirectAsync(in TState state, Func<TState, CancellationToken, ValueTask<T>> underlying, HybridCacheEntryOptions? options)
Microsoft.Extensions.Caching.Hybrid.Tests (8)
BufferReleaseTests.cs (1)
83private static readonly HybridCacheEntryOptions _noUnderlying = new() { Flags = HybridCacheEntryFlags.DisableUnderlyingData };
ExpirationTests.cs (1)
28HybridCacheEntryOptions options = new() { Expiration = TimeSpan.FromMinutes(2), LocalCacheExpiration = TimeSpan.FromMinutes(1) };
L2Tests.cs (2)
23private static readonly HybridCacheEntryOptions _expiry = new() { Expiration = TimeSpan.FromMinutes(3.5) }; 25private static readonly HybridCacheEntryOptions _expiryNoL1 = new() { Flags = HybridCacheEntryFlags.DisableLocalCache, Expiration = TimeSpan.FromMinutes(3.5) };
ServiceConstructionTests.cs (3)
48var defaults = options.DefaultEntryOptions; 301var defaults = options.DefaultEntryOptions; 606HybridCacheEntryOptions? itemOptions = null;
UnreliableL2Tests.cs (1)
111private static HybridCacheEntryOptions NoL2Write { get; } = new HybridCacheEntryOptions { Flags = HybridCacheEntryFlags.DisableDistributedCacheWrite };