Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for Redis connection strings #45

Closed
dmarlow opened this issue Jun 12, 2018 · 2 comments
Closed

Please add support for Redis connection strings #45

dmarlow opened this issue Jun 12, 2018 · 2 comments

Comments

@dmarlow
Copy link

dmarlow commented Jun 12, 2018

We should be able to supply connection strings that contain all information rather than having to split everything up to pass along separately.

StackExchange.Redis has support for it.

@catcherwong
Copy link
Member

@dmarlow Thanks for your interest in this project.

It's a good idea and I will take a look ASAP!

@catcherwong
Copy link
Member

version 0.2.3 has supported connection string.

Two way you can use the connection string.

  1. Set value with Action.
services.AddDefaultRedisCache(options=>
{
    options.DBConfig.Configuration = "locahost:6379"; 
});
  1. Read from appsettings.json
services.AddDefaultRedisCache(Configuration);
"easycaching": {      
        "redis": {
            "dbconfig": {
                "Configuration": "localhost:6379"
            }
        }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants