28 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 (1)
Internal\DefaultHybridCache.cs (1)
311=> new HybridCacheEntryOptions
Microsoft.Extensions.Caching.Hybrid.Tests (21)
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) };
FactoryOptionsTests.cs (9)
66options: new HybridCacheEntryOptions 90options: new HybridCacheEntryOptions 119options: new HybridCacheEntryOptions 149options: new HybridCacheEntryOptions { Expiration = TimeSpan.FromMinutes(1) }); 182var options = new HybridCacheEntryOptions { Expiration = TimeSpan.FromMinutes(5) }; 219options: new HybridCacheEntryOptions 291options: new HybridCacheEntryOptions { Expiration = TimeSpan.FromMinutes(5) }); 480services.Configure<HybridCacheOptions>(o => o.DefaultEntryOptions = new HybridCacheEntryOptions 505services.Configure<HybridCacheOptions>(o => o.DefaultEntryOptions = new HybridCacheEntryOptions { LocalSize = -1 });
FunctionalTests.cs (2)
86var options = new HybridCacheEntryOptions { LocalSize = -1 }; 101var options = new HybridCacheEntryOptions { LocalSize = -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) };
PayloadTests.cs (1)
540options: new HybridCacheEntryOptions { Expiration = TimeSpan.FromMinutes(1), Flags = callerFlags },
ServiceConstructionTests.cs (3)
42options.DefaultEntryOptions = new() { Expiration = TimeSpan.FromSeconds(120), Flags = HybridCacheEntryFlags.DisableLocalCacheRead }; 594options.DefaultEntryOptions = new() 609itemOptions = new()
StampedeTests.cs (1)
23options.DefaultEntryOptions = new()
UnreliableL2Tests.cs (1)
216private static HybridCacheEntryOptions NoL2Write { get; } = new HybridCacheEntryOptions { Flags = HybridCacheEntryFlags.DisableDistributedCacheWrite };
66 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 (25)
HybridCacheOptions.cs (1)
25public HybridCacheEntryOptions? DefaultEntryOptions { get; set; }
Internal\DefaultHybridCache.cs (14)
114HybridCacheEntryOptions? defaultEntryOptions = _options.DefaultEntryOptions; 142HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 175HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 218HybridCacheEntryOptions? options, 287private static void ValidateOptions(HybridCacheEntryOptions? options) 293$"{nameof(HybridCacheEntryOptions)}.{nameof(HybridCacheEntryOptions.LocalSize)} must be non-negative."); 298private static long? GetLocalSize(HybridCacheEntryOptions? options) 310internal static HybridCacheEntryOptions CreateOptionsFromContext(HybridCacheEntryContext context) 320public override ValueTask SetAsync<T>(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable<string>? tags = null, CancellationToken cancellationToken = default) 332internal TimeSpan GetL1AbsoluteExpirationRelativeToNow(HybridCacheEntryOptions? options) 335internal TimeSpan GetL2AbsoluteExpirationRelativeToNow(HybridCacheEntryOptions? options) => options?.Expiration ?? _defaultExpiration; 338internal HybridCacheEntryFlags GetEffectiveFlags(HybridCacheEntryOptions? options) 341private 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) 276extern static DistributedCacheEntryOptions? ToDistributedCacheEntryOptions(HybridCacheEntryOptions options);
Internal\DefaultHybridCache.StampedeStateT.cs (5)
25private HybridCacheEntryOptions? _options; 51public void QueueUserWorkItem(in TState state, Func<TState, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 69public void QueueUserWorkItem(in TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 90public Task ExecuteDirectAsync(in TState state, Func<TState, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 105public Task ExecuteDirectAsync(in TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options)
Microsoft.Extensions.Caching.Hybrid.Tests (13)
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) };
FactoryOptionsTests.cs (3)
182var options = new HybridCacheEntryOptions { Expiration = TimeSpan.FromMinutes(5) }; 401HybridCacheEntryOptions options = DefaultHybridCache.CreateOptionsFromContext(context); 405PropertyInfo optionsProp = typeof(HybridCacheEntryOptions).GetProperty(prop.Name, BindingFlags.Public | BindingFlags.Instance)!;
FunctionalTests.cs (2)
86var options = new HybridCacheEntryOptions { LocalSize = -1 }; 101var options = new HybridCacheEntryOptions { LocalSize = -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)
216private static HybridCacheEntryOptions NoL2Write { get; } = new HybridCacheEntryOptions { Flags = HybridCacheEntryFlags.DisableDistributedCacheWrite };