Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to use distributed memory cache and distributed SQL Server cache together?

$
0
0

I have successfully implemented a distributed cache using SQL Server by setting it up as follows:

services.AddDistributedSqlServerCache(options =>{    options.ConnectionString = Configuration.GetConnectionString("App");    options.SchemaName = "dbo";    options.TableName = "Cache";});

And then I'm injecting it where I need it.

I currently can't upgrade to .NET 9 to implement the new HybridCache. In the meantime I would like to add distributed memory cache as my L1 cache. As both implementations use IDistributedCache per DI, how can I pass both implementations to my consumers?


Viewing all articles
Browse latest Browse all 4839

Trending Articles