Пример #1
0
 /// <summary>
 /// 写入缓存
 /// </summary>
 /// <param name="value">对象数据</param>
 /// <param name="cacheKey">键</param>
 /// <param name="TimeSpan">缓存时间</param>
 public void Write <T>(string cacheKey, T value, TimeSpan timeSpan, long dbId = 0) where T : class
 {
     RedisCache.Set(RedisPrev + cacheKey, value, timeSpan, dbId);
 }
Пример #2
0
 /// <summary>
 /// 写入缓存
 /// </summary>
 /// <param name="value">对象数据</param>
 /// <param name="cacheKey">键</param>
 /// <param name="expireTime">到期时间</param>
 public void Write <T>(string cacheKey, T value, DateTime expireTime, long dbId = 0) where T : class
 {
     RedisCache.Set(RedisPrev + cacheKey, value, expireTime, dbId);
 }