7 writes to DistributedCacheServiceKey
Microsoft.Extensions.Caching.Hybrid.Tests (7)
ServiceConstructionTests.cs (7)
60services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 75services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 86services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 187services.AddKeyedHybridCache("one", options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 188services.AddKeyedHybridCache("two", options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache2)); 254services.AddKeyedHybridCache("HybridWithRedis", options => options.DistributedCacheServiceKey = "Redis"); 255services.AddKeyedHybridCache("HybridWithSqlServer", options => options.DistributedCacheServiceKey = "SqlServer");
5 references to DistributedCacheServiceKey
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (2)
82_backendCache = _options.DistributedCacheServiceKey is null 84: services.GetRequiredKeyedService<IDistributedCache>(_options.DistributedCacheServiceKey);
Microsoft.Extensions.Caching.Hybrid.Tests (3)
ServiceConstructionTests.cs (3)
67Assert.Same(typeof(CustomMemoryDistributedCache1), hybridOptions.DistributedCacheServiceKey); 194Assert.Same(typeof(CustomMemoryDistributedCache1), cacheOneOptions.DistributedCacheServiceKey); 200Assert.Same(typeof(CustomMemoryDistributedCache2), cacheTwoOptions.DistributedCacheServiceKey);