Created
August 29, 2019 21:49
-
-
Save ntakouris/37cd8ca13da642129785603a464e8b00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redisCacheSettings = new RedisCacheSettings(); | |
configuration.GetSection(nameof(RedisCacheSettings)).Bind(redisCacheSettings); | |
services.AddSingleton(redisCacheSettings); | |
if (!redisCacheSettings.Enabled) | |
{ | |
return; | |
} | |
services.AddStackExchangeRedisCache(options => options.Configuration = redisCacheSettings.ConnectionString); | |
services.AddSingleton<IResponseCacheService, ResponseCacheService>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment