1 interface inheriting from IDistributedCache
Microsoft.Extensions.Caching.Abstractions (1)
8 implementations of IDistributedCache
Microsoft.AspNetCore.Session.Tests (1)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.SqlServer (1)
237 references to IDistributedCache
Aspire.StackExchange.Redis.DistributedCaching (2)
Aspire.StackExchange.Redis.DistributedCaching.Tests (4)
Aspire.StackExchange.Redis.Tests (4)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Mvc.TagHelpers (4)
Microsoft.AspNetCore.Session (8)
Microsoft.AspNetCore.Session.Tests (9)
Microsoft.Extensions.AI (17)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
Microsoft.Extensions.AI.Tests (4)
Microsoft.Extensions.Caching.Abstractions (15)
DistributedCacheExtensions.cs (9)
12/// Extension methods for setting data in an <see cref="IDistributedCache" />.
25public static void Set(this IDistributedCache cache, string key, byte[] value)
42public static Task SetAsync(this IDistributedCache cache, string key, byte[] value, CancellationToken token = default(CancellationToken))
57public static void SetString(this IDistributedCache cache, string key, string value)
70public static void SetString(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options)
87public static Task SetStringAsync(this IDistributedCache cache, string key, string value, CancellationToken token = default(CancellationToken))
102public static Task SetStringAsync(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken))
116public static string? GetString(this IDistributedCache cache, string key)
133public static async Task<string?> GetStringAsync(this IDistributedCache cache, string key, CancellationToken token = default(CancellationToken))
IBufferDistributedCache.cs (4)
21/// <remarks>This method is functionally similar to <see cref="IDistributedCache.Get(string)"/>, but avoids the array allocation.</remarks>
31/// <remarks>This method is functionally similar to <see cref="IDistributedCache.GetAsync(string, CancellationToken)"/>, but avoids the array allocation.</remarks>
40/// <remarks>This method is functionally similar to <see cref="IDistributedCache.Set(string, byte[], DistributedCacheEntryOptions)"/>, but avoids the array allocation.</remarks>
50/// <remarks>This method is functionally similar to <see cref="IDistributedCache.SetAsync(string, byte[], DistributedCacheEntryOptions, CancellationToken)"/>, but avoids the array allocation.</remarks>
Microsoft.Extensions.Caching.Hybrid (3)
Microsoft.Extensions.Caching.Hybrid.Tests (53)
L2Tests.cs (13)
39services.AddSingleton<IDistributedCache>(buffers ? new BufferLoggingCache(Log, localCache) : new LoggingCache(Log, localCache));
159public BufferLoggingCache(ITestOutputHelper log, IDistributedCache tail)
207internal class LoggingCache(ITestOutputHelper log, IDistributedCache tail) : IDistributedCache
210protected IDistributedCache Tail => tail;
216byte[]? IDistributedCache.Get(string key)
223Task<byte[]?> IDistributedCache.GetAsync(string key, CancellationToken token)
230void IDistributedCache.Refresh(string key)
237Task IDistributedCache.RefreshAsync(string key, CancellationToken token)
244void IDistributedCache.Remove(string key)
251Task IDistributedCache.RemoveAsync(string key, CancellationToken token)
258void IDistributedCache.Set(string key, byte[] value, DistributedCacheEntryOptions options)
265Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token)
Microsoft.Extensions.Caching.Memory (4)
Microsoft.Extensions.Caching.MicroBenchmarks (2)
Microsoft.Extensions.Caching.SqlServer (1)
Microsoft.Extensions.Caching.SqlServer.Tests (29)
Microsoft.Extensions.Caching.StackExchangeRedis (1)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (55)