/// <summary> /// 写入缓存 /// </summary> /// <param name="value">对象数据</param> /// <param name="cacheKey">键</param> /// <param name="TimeSpan">缓存时间</param> public void Write <T>(string cacheKey, T value, TimeSpan timeSpan, int dbId = 0) where T : class { RedisConnection.Set(cacheKey, value, timeSpan, dbId); }
/// <summary> /// 写入缓存 /// </summary> /// <param name="value">对象数据</param> /// <param name="cacheKey">键</param> /// <param name="expireTime">到期时间</param> public void Write <T>(string cacheKey, T value, DateTime expireTime, int dbId = 0) where T : class { RedisConnection.Set(cacheKey, value, expireTime, dbId); }