7 writes to DistributedCacheServiceKey
Microsoft.Extensions.Caching.Hybrid.Tests (7)
ServiceConstructionTests.cs (7)
61services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 76services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 87services.AddHybridCache(options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 188services.AddKeyedHybridCache("one", options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache1)); 189services.AddKeyedHybridCache("two", options => options.DistributedCacheServiceKey = typeof(CustomMemoryDistributedCache2)); 255services.AddKeyedHybridCache("HybridWithRedis", options => options.DistributedCacheServiceKey = "Redis"); 256services.AddKeyedHybridCache("HybridWithSqlServer", options => options.DistributedCacheServiceKey = "SqlServer");
11 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 (9)
ServiceConstructionTests.cs (9)
68Assert.Same(typeof(CustomMemoryDistributedCache1), hybridOptions.DistributedCacheServiceKey); 195Assert.Same(typeof(CustomMemoryDistributedCache1), cacheOneOptions.DistributedCacheServiceKey); 201Assert.Same(typeof(CustomMemoryDistributedCache2), cacheTwoOptions.DistributedCacheServiceKey); 333Assert.Equal("DistributedOne", hybridOneOptions.DistributedCacheServiceKey); 338Assert.Equal("DistributedTwo", hybridTwoOptions.DistributedCacheServiceKey); 371Assert.Equal("DistributedOne", hybridOneOptions.DistributedCacheServiceKey); 376Assert.Equal("DistributedTwo", hybridTwoOptions.DistributedCacheServiceKey); 409Assert.Equal("DistributedOne", hybridOneOptions.DistributedCacheServiceKey); 414Assert.Equal("DistributedTwo", hybridTwoOptions.DistributedCacheServiceKey);