public RedisCacheManager(AppSettings appSettings) : base(appSettings)
        {
            _redisConfig = appSettings.RedisConfig;
            var configurationOptions = new ConfigurationOptions
            {
                EndPoints          = { $"{_redisConfig.RedisHost}:{_redisConfig.RedisPort}" },
                Ssl                = _redisConfig.Ssl,
                AbortOnConnectFail = _redisConfig.AbortOnConnectFail,
            };

            _connectionMultiplexer = ConnectionMultiplexer.Connect(configurationOptions);
            _database = _connectionMultiplexer.GetDatabase(_currentDatabaseID);
        }
Пример #2
0
 public RedisCacheManager(AppSettings appSettings) : base(appSettings)
 {
     _redisConfig           = appSettings.RedisConfig;
     _connectionMultiplexer = ConnectionMultiplexer.Connect($"{ _redisConfig.RedisHost}:{ _redisConfig.RedisPort}");
     _database = _connectionMultiplexer.GetDatabase(_currentDatabaseID);
 }