public RedisCacheManager(IRedisConnectionWrapper redisConnectionWrapper, IMemoryCacheManager memoryCacheManager) { _redisConnectionWrapper = redisConnectionWrapper; _memoryCacheManager = memoryCacheManager; this._db = _redisConnectionWrapper.Database(); }
public RedisCacheManager(IRedisConnectionWrapper connectionWrapper) { // if (String.IsNullOrEmpty(redisConnString)) // throw new Exception("Redis connection string is empty"); // ConnectionMultiplexer.Connect should only be called once and shared between callers this._connectionWrapper = connectionWrapper; this._db = _connectionWrapper.Database(); }
public RedisCacheManager(ChinaBeaconConfig config, IRedisConnectionWrapper connectionWrapper) { if (String.IsNullOrEmpty(config.RedisCachingConnectionString)) { throw new Exception("Redis connection string is empty"); } // ConnectionMultiplexer.Connect should only be called once and shared between callers this._connectionWrapper = connectionWrapper; this._db = _connectionWrapper.Database(); this._perRequestCacheManager = EngineContext.Current.Resolve <ICacheManager>(); }
public RedisCacheStore(IRedisConnectionWrapper connectionWrapper, IRedisServerSettings settings, ISerializer serializer) { _database = connectionWrapper.Database(settings.DefaultDb); _serializer = serializer; _readFlag = settings.PreferSlaveForRead ? CommandFlags.PreferSlave : CommandFlags.PreferMaster; }
public RedisCacheManager(IRedisConnectionWrapper connectionWrapper) { this._connectionWrapper = connectionWrapper; this._db = _connectionWrapper.Database(); }
public RedisCacheStore(IRedisConnectionWrapper connectionWrapper, RedisSettings redisSettings) { this.database = connectionWrapper.Database(redisSettings.DefaultDb); this.server = connectionWrapper.FirstServer(); this.readFlag = redisSettings.PreferSlaveForRead ? CommandFlags.PreferSlave : CommandFlags.PreferMaster; }