7 writes to DistributedCacheServiceKey
Microsoft.Extensions.Caching.Hybrid.Tests (7)
ServiceConstructionTests.cs (7)
60
services.AddHybridCache(options => options.
DistributedCacheServiceKey
= typeof(CustomMemoryDistributedCache1));
75
services.AddHybridCache(options => options.
DistributedCacheServiceKey
= typeof(CustomMemoryDistributedCache1));
86
services.AddHybridCache(options => options.
DistributedCacheServiceKey
= typeof(CustomMemoryDistributedCache1));
187
services.AddKeyedHybridCache("one", options => options.
DistributedCacheServiceKey
= typeof(CustomMemoryDistributedCache1));
188
services.AddKeyedHybridCache("two", options => options.
DistributedCacheServiceKey
= typeof(CustomMemoryDistributedCache2));
254
services.AddKeyedHybridCache("HybridWithRedis", options => options.
DistributedCacheServiceKey
= "Redis");
255
services.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)
67
Assert.Same(typeof(CustomMemoryDistributedCache1), hybridOptions.
DistributedCacheServiceKey
);
194
Assert.Same(typeof(CustomMemoryDistributedCache1), cacheOneOptions.
DistributedCacheServiceKey
);
200
Assert.Same(typeof(CustomMemoryDistributedCache2), cacheTwoOptions.
DistributedCacheServiceKey
);