3 types derived from MemoryDistributedCache
Microsoft.Extensions.Caching.Hybrid.Tests (3)
BufferReleaseTests.cs (1)
85private class TestCache : MemoryDistributedCache, IBufferDistributedCache
ServiceConstructionTests.cs (2)
635internal class CustomMemoryDistributedCache1 : MemoryDistributedCache 648internal class CustomMemoryDistributedCache2 : MemoryDistributedCache
19 instantiations of MemoryDistributedCache
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
DistributedCacheTagHelperTest.cs (1)
776return new DistributedCacheTagHelperStorage(new MemoryDistributedCache(options ?? Options.Create(new MemoryDistributedCacheOptions())));
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1158_cache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()));
Microsoft.Extensions.AI.Integration.Tests (6)
ChatClientIntegrationTests.cs (5)
663new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))); 688new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))); 736.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 776.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 818.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
EmbeddingGeneratorIntegrationTests.cs (1)
89.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIAssistantChatClientTests.cs (1)
61.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
OpenAIChatClientTests.cs (2)
67.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 92.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
OpenAIEmbeddingGeneratorTests.cs (2)
62.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 85.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
OpenAIResponseClientTests.cs (1)
62.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.Caching.Hybrid.Tests (5)
ExpirationTests.cs (1)
23var l2 = new LoggingCache(log, new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions { Clock = clock })));
L2Tests.cs (1)
39var localCache = new MemoryDistributedCache(localCacheOptions);
LocalInvalidationTests.cs (1)
59MemoryDistributedCache mdc = new(Options.Create(options));
PayloadTests.cs (2)
278var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions())); 305var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()));
12 references to MemoryDistributedCache
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1147private readonly MemoryDistributedCache _cache;
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
89&& _backendCache.GetType() == typeof(MemoryDistributedCache)
Microsoft.Extensions.Caching.Hybrid.Tests (6)
L2Tests.cs (1)
39var localCache = new MemoryDistributedCache(localCacheOptions);
LocalInvalidationTests.cs (1)
59MemoryDistributedCache mdc = new(Options.Create(options));
PayloadTests.cs (2)
278var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions())); 305var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()));
ServiceConstructionTests.cs (2)
497services.AddSingleton<IDistributedCache, MemoryDistributedCache>(); 531services.AddSingleton<IDistributedCache, MemoryDistributedCache>();
Microsoft.Extensions.Caching.Memory (3)
MemoryCacheServiceCollectionExtensions.cs (1)
71services.TryAdd(ServiceDescriptor.Singleton<IDistributedCache, MemoryDistributedCache>());
MemoryDistributedCache.cs (2)
22/// Creates a new <see cref="MemoryDistributedCache"/> instance. 29/// Creates a new <see cref="MemoryDistributedCache"/> instance.
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
CacheServiceExtensionsTests.cs (1)
175&& l2.GetType() == typeof(MemoryDistributedCache)