/// <summary> /// 存储数据到hash表 /// </summary> public static bool Set <T>(string hashId, string key, T t, DateTime tmpExpire) { var result = new RedisOperatorBase().Set(key, t); return(result); }
/// <summary> /// 移除hash中的某值 /// </summary> public static bool Remove(string hashId, string key) { var result = new RedisOperatorBase().Remove(hashId, key); return(result); }
/// <summary> /// 存储数据到hash表 /// </summary> public static bool Set <T>(string key, T t) { var result = new RedisOperatorBase().Set <T>(key, t); return(result); }
/// <summary> /// 存储数据到hash表 /// </summary> public static bool Set(string key, string value, DateTime tmpExpire) { var result = new RedisOperatorBase().Set(key, value, tmpExpire); return(result); }
/// <summary> /// 判断某个数据是否已经被缓存 /// </summary> public static bool Exist <T>(string hashId, string key) { var result = new RedisOperatorBase().Redis.HashContainsEntry(hashId, key); return(result); }
/// <summary> /// 判断某个数据是否已经被缓存 /// </summary> public static bool Exist(string key) { var result = new RedisOperatorBase().Redis.ContainsKey(key); return(result); }
/// <summary> /// 存取任意类型的值(hashId与key相同) /// </summary> public static T Get <T>(string key) { var result = new RedisOperatorBase().Get <T>(key); return(result); }