public RedisCacheManager( ICacheManager perRequestCacheManager, IRedisConnectionWrapper connectionWrapper, CacheOptions config) { if (string.IsNullOrEmpty(config.RedisCachingConnection)) { throw new Exception("Redis connection string is empty"); } _perRequestCacheManager = perRequestCacheManager; // ConnectionMultiplexer.Connect should only be called once and shared between callers _connectionWrapper = connectionWrapper; _db = _connectionWrapper.GetDatabase(); _config = config; }
public RedisConnectionWrapper(CacheOptions config) { _config = config; _connectionString = new Lazy <string>(GetConnectionString); _redisLockFactory = CreateRedisLockFactory(); }
public MemoryCacheManager(IMemoryCache cache, CacheOptions config) { _cache = cache; _config = config; _cancellationTokenSource = new CancellationTokenSource(); }
public PerRequestCacheManager(IHttpContextAccessor httpContextAccessor, CacheOptions config) { _httpContextAccessor = httpContextAccessor; _config = config; }