I cannot get StrackRedis.L1 to work with ASP.NET Core distributed cache.
It's configured as following:
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = distributedCacheConfig.ConnectionString;
options.ConnectionMultiplexerFactory = async () =>
{
var mux = await ConnectionMultiplexer.ConnectAsync(options.Configuration);
_ = new StackRedis.L1.RedisL1Database(mux.GetDatabase());
return mux;
};
});
When running the application the RedisL1Database constructor gets called with no errors. However it does not seems like the in-memory cache layer is being used at all and Redis is instead being used as normal. Expecting the console to write mem cache hits. Also tired to set breakpoints inside L1 project with no hits.
I'm are running master of this project with Microsoft.Extensions.Caching.StackExchangeRedis/6.0.1 and StackExchange.Redis/2.2.4.
Should L1 work with ASP.NET Core distributed cache?
Is there anything wrong in my configuration?
I cannot get
StrackRedis.L1to work with ASP.NET Core distributed cache.It's configured as following:
When running the application the
RedisL1Databaseconstructor gets called with no errors. However it does not seems like the in-memory cache layer is being used at all and Redis is instead being used as normal. Expecting the console to write mem cache hits. Also tired to set breakpoints inside L1 project with no hits.I'm are running master of this project with Microsoft.Extensions.Caching.StackExchangeRedis/6.0.1 and StackExchange.Redis/2.2.4.
Should L1 work with ASP.NET Core distributed cache?
Is there anything wrong in my configuration?