My Redis DB has many instances (db0, db1, db2 ...). I am using each instance for for different environments.
I configured distributed cache object to as following:
services.AddDistributedRedisCache(options =>
{
options.Configuration = "localhost";
options.InstanceName = "SampleInstance";
});
With the StackExchange.Redis I could get the db. How do I do it here ?