public StringUnitTest(ITestOutputHelper testOutput) { redisHelper = new Sample.RedisHelper(); Connection = RedisConnectionHelper.Instanse ?? RedisConnectionHelper.GetConnectionMultiplexer(); Database = Connection.GetDatabase(0); testOutputHelper = testOutput; }
public RedisClient(int dbNum, string readWriteHosts) { DbNum = dbNum; _conn = string.IsNullOrWhiteSpace(readWriteHosts) ? RedisConnectionHelper.Instance : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts); }
public RedisClient(int dbNum, string expirySecond, string readWriteHosts) { DbNum = dbNum;//默认1 _conn = string.IsNullOrWhiteSpace(readWriteHosts) ? RedisConnectionHelper.Instance : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts); this.expiry = TimeSpan.FromSeconds(Double.Parse(expirySecond)); }
public RedisClient(int dbNum, string readWriteHosts) { DbNum = dbNum; _conn = string.IsNullOrWhiteSpace(readWriteHosts) ? RedisConnectionHelper.Instance : RedisConnectionHelper.GetConnectionMultiplexer(readWriteHosts); expiry = TimeSpan.FromHours(Double.Parse(CustomConfigParam.RedisExpiryHours)); }