public static CacheBuilder AddRedisProvider(this CacheBuilder cacheBuilder, IConfiguration configuration) { cacheBuilder.Services.Configure <RedisCacheOption>(configuration); cacheBuilder.AddCacheProvider <RedisCacheProvider>(); cacheBuilder.Services.TryAddSingleton <RedisDB>(); return(cacheBuilder); }
public static CacheBuilder AddMemoryProvider(this CacheBuilder cacheBuilder) { cacheBuilder.AddCacheProvider <MemoryCacheProvider>(); return(cacheBuilder); }