public RedisService(ILogger <RedisService> logger, IRedisServiceConfiguration configuration) { _logger = logger; _configuration = configuration; Connect(); }
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); }