Example #1
0
        public RedisService(ILogger <RedisService> logger, IRedisServiceConfiguration configuration)
        {
            _logger        = logger;
            _configuration = configuration;

            Connect();
        }
Example #2
0
        public static ConfigurationOptions ParseRedisConfigurationOptions(IRedisServiceConfiguration configuration)
        {
            var configOptions = new ConfigurationOptions();

            configOptions.EndPoints.Add($"{configuration.RedisIp}:{configuration.RedisPort}");
            configOptions.ClientName  = configuration.ClientName;
            configOptions.SyncTimeout = configuration.RedisSyncOperationsTimeoutMs;

            return(configOptions);
        }