Closed akshatchhangani closed 9 months ago
Hi @akshatchhangani
here some answers:
1) Rea here the documentation https://github.com/imperugo/StackExchange.Redis.Extensions/blob/master/doc/configuration/connection-pool.md
2) I think you are referring to the property Database
of RedisConfiguration
. This property sets the default database to use for the operations.
Basically you can set 3 and, when you do something like this
var result = await redisDatabase.GetAsync<MyClass?>(cacheKey, CommandFlags.PreferReplica);
here redisDatabase is an instance of
IRedisDatabase
this command will be work on database 3.
3) You can access to any database of redis in any moment. Is enough to use IRedisClient
instead of IRedisDatabase
and choise the database you prefer
redisClient.Db5.AddAsync(......
4) I also using this with AWS ElasticCache but I neved did this issue. I need more information in order to help you but is seems like you are not registering the DI as Singleton so the connection will be created any time you connect or there are connection issues to the Redis database.
Let me know if is enough or not.
Thanks
Hi Team, I am using StackExchange Redis Library. I have doubts like,