Closed shaunbowe closed 10 years ago
Hey!
The default options provided by the web.config
are for really simple cases. If you require anything special I'd suggest using the SetClientManager
static configuration (as seen in the README or the sample project).
private IRedisClientsManager clientManager;
protected void Application_Start()
{
// Or use your IoC container to wire this up.
this.clientManager = new PooledRedisClientManager(initialDb: 13, readWriteHosts: "localhost:6379");
RedisSessionStateStoreProvider.SetClientManager(this.clientManager);
}
protected void Application_End()
{
this.clientManager.Dispose();
}
Hope this helps!
I would like to be able to specify the initial database when setting up the connection. Here is the code to accomplish this. I was unable to create a pull request.