dotnetcore / EasyCaching

:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
MIT License
1.92k stars 321 forks source link

Support configure code-only configuration for StackExchange.Redis bus #453

Closed Memoyu closed 1 year ago

Memoyu commented 1 year ago

Usage:

var redisConfig = ConfigurationOptions.Parse("127.0.0.1:6379");
redisConfig.DefaultDatabase = 6;
services.AddEasyCaching(option =>
{
    option.WithRedisBus(config =>
    {
        config.ConfigurationOptions = redisConfig;
        config.SerializerName = "myredis";
    });
});