1 interface inheriting from IDistributedCache
Microsoft.Extensions.Caching.Abstractions (1)
4 implementations of IDistributedCache
Microsoft.AspNetCore.Session.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.SqlServer (1)
173 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.Caching.Abstractions (15)
DistributedCacheExtensions.cs (9)
12/// Extension methods for setting data in an <see cref="IDistributedCache" />.
23public static void Set(this IDistributedCache cache, string key, byte[] value)
40public static Task SetAsync(this IDistributedCache cache, string key, byte[] value, CancellationToken token = default(CancellationToken))
55public static void SetString(this IDistributedCache cache, string key, string value)
68public static void SetString(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options)
85public static Task SetStringAsync(this IDistributedCache cache, string key, string value, CancellationToken token = default(CancellationToken))
100public static Task SetStringAsync(this IDistributedCache cache, string key, string value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken))
114public static string? GetString(this IDistributedCache cache, string key)
131public 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 (34)
L2Tests.cs (13)
39services.AddSingleton<IDistributedCache>(buffers ? new BufferLoggingCache(Log, localCache) : new LoggingCache(Log, localCache));
159public BufferLoggingCache(ITestOutputHelper log, IDistributedCache tail)
207private 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 (52)