2 types derived from MemoryDistributedCache
Microsoft.Extensions.Caching.Hybrid.Tests (2)
BufferReleaseTests.cs (1)
85private class TestCache : MemoryDistributedCache, IBufferDistributedCache
ServiceConstructionTests.cs (1)
296internal class CustomMemoryDistributedCache : MemoryDistributedCache
17 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.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (1)
87.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
AzureAIInferenceEmbeddingGeneratorTests.cs (1)
70.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.AI.Integration.Tests (3)
ChatClientIntegrationTests.cs (2)
324new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))); 349new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())));
EmbeddingGeneratorIntegrationTests.cs (1)
86.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientTests.cs (1)
55.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
OllamaEmbeddingGeneratorTests.cs (1)
35.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (2)
104.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 129.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
OpenAIEmbeddingGeneratorTests.cs (2)
85.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions()))) 108.UseDistributedCache(new MemoryDistributedCache(Options.Options.Create(new MemoryDistributedCacheOptions())))
Microsoft.Extensions.Caching.Hybrid.Tests (4)
ExpirationTests.cs (1)
22var l2 = new LoggingCache(log, new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions { Clock = clock })));
LocalInvalidationTests.cs (1)
58MemoryDistributedCache mdc = new(Options.Create(options));
PayloadTests.cs (2)
277var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions())); 304var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()));
11 references to MemoryDistributedCache
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1147private readonly MemoryDistributedCache _cache;
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
82&& _backendCache.GetType() == typeof(MemoryDistributedCache)
Microsoft.Extensions.Caching.Hybrid.Tests (6)
L2Tests.cs (1)
38var localCache = new MemoryDistributedCache(localCacheOptions);
LocalInvalidationTests.cs (1)
58MemoryDistributedCache mdc = new(Options.Create(options));
PayloadTests.cs (2)
277var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions())); 304var localCache = new MemoryDistributedCache(Options.Create(new MemoryDistributedCacheOptions()));
ServiceConstructionTests.cs (2)
158services.AddSingleton<IDistributedCache, MemoryDistributedCache>(); 192services.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.