public static CacheBuilder AddRedisProvider(this CacheBuilder cacheBuilder, IConfiguration configuration)
 {
     cacheBuilder.Services.Configure <RedisCacheOption>(configuration);
     cacheBuilder.AddCacheProvider <RedisCacheProvider>();
     cacheBuilder.Services.TryAddSingleton <RedisDB>();
     return(cacheBuilder);
 }
コード例 #2
0
 public static CacheBuilder AddMemoryProvider(this CacheBuilder cacheBuilder)
 {
     cacheBuilder.AddCacheProvider <MemoryCacheProvider>();
     return(cacheBuilder);
 }