Skip to content

uliian/StackExchange.Redis.Pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StackExchange.Redis.Pool

For StackExchange.Redis connection pool

Build Status

Build Status

Why?

solve timeout prolem:

Was there a big request preceding several small requests to the Redis that timed out? https://github.com/StackExchange/StackExchange.Redis/blob/master/docs/Timeouts.md

How to use

Install

Install-Package StackExchange.Redis.ConnectionPool

Add Dependency Inject

add dependency inject to IServiceCollection

collection.AddRedisConnectionPool("localhost:6379", 10);

OR

collection.AddRedisConnectionPool(option=>{
    // todo config
}, 10);

the more config infomation,look at StackEchange.Redis

doc:https://stackexchange.github.io/StackExchange.Redis/Configuration

if you need one connection object per scope(like one user one request)

direct use inject object: IConnectionMultiplexer

if you need pool (for Parallel case)

use pool object : ObjectPool<PooledConnectionMultiplexer>

About

For StackExchange.Redis add connection pool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages