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