Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数  /  public
 /// </summary>
 /// <param name="dbIndex">RedisDB,默认dbIndex =0</param>
 /// <param name="ValidTimeSpan">默认过期时间  单位:分钟</param>
 public RedisOperation(RedisDBEnum dbIndex, double ValidTimeSpan)
 {
     _DB = Redis.DB(dbIndex.ToInt());
     _defaultValidTimeSpan = TimeSpan.FromMinutes(ValidTimeSpan);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数  /  public
 /// </summary>
 /// <param name="dbIndex">RedisDB,默认dbIndex =0</param>
 public RedisOperation(RedisDBEnum dbIndex)
 {
     _DB = Redis.DB(dbIndex.ToInt());
     _defaultValidTimeSpan = TimeSpan.FromHours(Redis.DefaultValidTimeSpan);
 }