Reputation: 1143
I want to connect to a specific database in our new Azure Redis cache but can't seem to figure out how to do it.
I've tried adding the database id to connection string in various forms as well as looking for GetDatabase(dbid) on the IDistributedcache object (which doesn't seem to exist).
FYI, I want to use the same cache for our testing and production without having to pay for an additional redis cache so I'm open to alternative approaches.
Upvotes: 1
Views: 510
Reputation: 891
You could also use the ConnectionMultiplexer object directly and access the Database via the GetDatabase method.
Upvotes: 1