8 instantiations of DistributedCacheEntryOptions
Microsoft.AspNetCore.Mvc.TagHelpers (1)
DistributedCacheTagHelper.cs (1)
80var options = new DistributedCacheEntryOptions();
Microsoft.AspNetCore.Session (1)
DistributedSession.cs (1)
282new DistributedCacheEntryOptions().SetSlidingExpiration(_idleTimeout),
Microsoft.Extensions.Caching.Abstractions (2)
DistributedCacheExtensions.cs (1)
16private static readonly DistributedCacheEntryOptions DefaultOptions = new DistributedCacheEntryOptions().Freeze();
Hybrid\HybridCacheEntryOptions.cs (1)
36=> Expiration is null ? null : (_dc ??= new() { AbsoluteExpirationRelativeToNow = Expiration });
Microsoft.Extensions.Caching.Hybrid (3)
Internal\DefaultHybridCache.cs (1)
123_defaultDistributedCacheExpiration = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = _defaultExpiration };
Internal\DefaultHybridCache.L2.cs (2)
21private static readonly DistributedCacheEntryOptions _tagInvalidationEntryOptions = new() { AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(MaxCacheDays) }; 280=> new() { AbsoluteExpirationRelativeToNow = options.Expiration };
Microsoft.Extensions.Caching.Hybrid.Tests (1)
DistributedCacheTests.cs (1)
393= new() { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) };
53 references to DistributedCacheEntryOptions
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Cache\DistributedCacheTagHelperService.cs (1)
65public async Task<IHtmlContent> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options)
Cache\DistributedCacheTagHelperStorage.cs (1)
34public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options)
Cache\IDistributedCacheTagHelperService.cs (2)
21/// <param name="options">The <see cref="DistributedCacheEntryOptions"/>.</param> 23Task<IHtmlContent> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options);
Cache\IDistributedCacheTagHelperStorage.cs (1)
28Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options);
DistributedCacheTagHelper.cs (2)
77internal DistributedCacheEntryOptions GetDistributedCacheEntryOptions() 80var options = new DistributedCacheEntryOptions();
Microsoft.Extensions.AI.Evaluation.Reporting (2)
Storage\DiskBasedResponseCache.cs (2)
186public void Set(string key, byte[] value, DistributedCacheEntryOptions options) 201DistributedCacheEntryOptions options,
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
Storage\AzureStorageResponseCache.cs (2)
152public void Set(string key, byte[] value, DistributedCacheEntryOptions options) 168DistributedCacheEntryOptions options,
Microsoft.Extensions.AI.Tests (2)
TestInMemoryCacheStorage.cs (2)
41public void Set(string key, byte[] value, DistributedCacheEntryOptions options) 46public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
Microsoft.Extensions.Caching.Abstractions (19)
DistributedCacheEntryExtensions.cs (7)
9/// Provides extension methods for <see cref="DistributedCacheEntryOptions"/> operations. 18public static DistributedCacheEntryOptions SetAbsoluteExpiration( 19this DistributedCacheEntryOptions options, 31public static DistributedCacheEntryOptions SetAbsoluteExpiration( 32this DistributedCacheEntryOptions options, 45public static DistributedCacheEntryOptions SetSlidingExpiration( 46this DistributedCacheEntryOptions options,
DistributedCacheEntryOptions.cs (1)
70internal DistributedCacheEntryOptions Freeze()
DistributedCacheExtensions.cs (3)
16private static readonly DistributedCacheEntryOptions DefaultOptions = new DistributedCacheEntryOptions().Freeze(); 70public static void SetString(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options) 102public static Task SetStringAsync(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken))
Hybrid\HybridCacheEntryOptions.cs (2)
34private DistributedCacheEntryOptions? _dc; 35internal DistributedCacheEntryOptions? ToDistributedCacheEntryOptions()
IBufferDistributedCache.cs (4)
40/// <remarks>This method is functionally similar to <see cref="IDistributedCache.Set(string, byte[], DistributedCacheEntryOptions)"/>, but avoids the array allocation.</remarks> 41void Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options); 50/// <remarks>This method is functionally similar to <see cref="IDistributedCache.SetAsync(string, byte[], DistributedCacheEntryOptions, CancellationToken)"/>, but avoids the array allocation.</remarks> 51ValueTask SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token = default);
IDistributedCache.cs (2)
35void Set(string key, byte[] value, DistributedCacheEntryOptions options); 45Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken));
Microsoft.Extensions.Caching.Hybrid (6)
Internal\DefaultHybridCache.cs (1)
47private readonly DistributedCacheEntryOptions _defaultDistributedCacheExpiration;
Internal\DefaultHybridCache.L2.cs (5)
21private static readonly DistributedCacheEntryOptions _tagInvalidationEntryOptions = new() { AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(MaxCacheDays) }; 82internal ValueTask SetDirectL2Async(string key, in BufferChunk buffer, DistributedCacheEntryOptions options, CancellationToken token) 258private DistributedCacheEntryOptions GetL2DistributedCacheOptions(HybridCacheEntryOptions? options) 260DistributedCacheEntryOptions? result = null; 279static DistributedCacheEntryOptions ToDistributedCacheEntryOptions(HybridCacheEntryOptions options)
Microsoft.Extensions.Caching.Hybrid.Tests (13)
BufferReleaseTests.cs (2)
92void IBufferDistributedCache.Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options) 95ValueTask IBufferDistributedCache.SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token)
DistributedCacheTests.cs (1)
392private static readonly DistributedCacheEntryOptions _fiveMinutes
L2Tests.cs (4)
165void IBufferDistributedCache.Set(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options) 172ValueTask IBufferDistributedCache.SetAsync(string key, ReadOnlySequence<byte> value, DistributedCacheEntryOptions options, CancellationToken token) 259void IDistributedCache.Set(string key, byte[] value, DistributedCacheEntryOptions options) 266Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token)
NullDistributedCache.cs (2)
25void IDistributedCache.Set(string key, byte[] value, DistributedCacheEntryOptions options) 30Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token) => Task.CompletedTask;
StampedeTests.cs (2)
55void IDistributedCache.Set(string key, byte[] value, DistributedCacheEntryOptions options) => throw new NotSupportedException("Intentionally not provided"); 57Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token) => throw new NotSupportedException("Intentionally not provided");
UnreliableL2Tests.cs (2)
178public void Set(string key, byte[] value, DistributedCacheEntryOptions options) => throw new NotSupportedException(); // only async API in use 180public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
Microsoft.Extensions.Caching.Memory (2)
MemoryDistributedCache.cs (2)
73public void Set(string key, byte[] value, DistributedCacheEntryOptions options) 95public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken))