I\'m designing a web service which uses Redis as a database, and I want to know the best practices for using Redis connecting with StackService client.
The point is that
I used PooledRedisClientManager
and it works fine:
Sample code that I run only once:
static PooledRedisClientManager pooledClientManager = new PooledRedisClientManager("localhost");
and code I run on many threads:
var redisClient = pooledClientManager.GetClient();
using (redisClient)
{
redisClient.Set("key" + i.ToString(), "value1");
}
and I have only 11 clients connected to the server.