thepirat000 / CachingFramework.Redis

Distributed caching based on StackExchange.Redis and Redis. Includes support for tagging and is cluster-compatible.
Other
287 stars 52 forks source link

Connection pool #43

Closed nkovacic closed 6 years ago

nkovacic commented 6 years ago

Is there anyway we could use this connection pool nuget for redis? Azure is throwing timeouts and suggesting to add it. https://github.com/uliian/StackExchange.Redis.Pool

thepirat000 commented 6 years ago

Hi, thanks for your suggestion.

I have added some overloads to the RedisContext class so you can inject your own IRedisConnectionMultiplexer, like the pooled connection you mentioned.

Please take a look at the unit test here.

For example:

var myMultiplexer = new PooledConnectionMultiplexer("localhost:6379");
var ctx = new CachingFramework.Redis.RedisContext(myMultiplexer);
//...

Note that the Context class is being renamed to RedisContext.

Please re-test with the latest version 8.1.0 and feel free to re-open this issue if you're still having problems.