Proper way to use PooledRedisClientManager in Plugins(GameServer)
Options
Sergey
✭
Hello!
Right now I'm using Singleton instance to get BasicRedisClientManager (ServiceStack.Redis)
When I create room I instantiate class where I keep methods with queries to Redis db(class Leaderboard). Through connector I define manager which is used to get clients for queries to db inside Leaderboard class. Example:
var lb = new Leaderboard(SingletonInstance.GetRedis())
Are there any another ways to use Redis Managers in Plugins? Using PooledRedisClientManager instead of BasicRedisClientManager causes some problems with connections (Can't really understand because of using singleton or not). If it possible I'd like to instantiate one PooledRedisClientManager and get clients from it. From any room.
Would be much appreciated for any advice and help!
Right now I'm using Singleton instance to get BasicRedisClientManager (ServiceStack.Redis)
When I create room I instantiate class where I keep methods with queries to Redis db(class Leaderboard). Through connector I define manager which is used to get clients for queries to db inside Leaderboard class. Example:
var lb = new Leaderboard(SingletonInstance.GetRedis())
Are there any another ways to use Redis Managers in Plugins? Using PooledRedisClientManager instead of BasicRedisClientManager causes some problems with connections (Can't really understand because of using singleton or not). If it possible I'd like to instantiate one PooledRedisClientManager and get clients from it. From any room.
Would be much appreciated for any advice and help!
0