public T GetHash <T>(RedisCacheTables tableName, long key)
        {
            var data = GetHash(tableName.ToString(), key);

            if (data == null)
            {
                return(default(T));
            }
            else
            {
                if (typeof(T) == typeof(String))
                {
                    return((T)(Object)data);
                }
                else
                {
                    return(Newtonsoft.Json.JsonConvert.DeserializeObject <T>(data));
                }
            }
        }
 public bool DeleteKey(RedisCacheTables key)
 {
     return(db.KeyDelete(key.ToString()));
 }
 public List <T> GetHashAllObj <T>(RedisCacheTables tableName)
 {
     return(GetHashAllObj <T>(tableName.ToString()));
 }
 public bool DeleteHash(RedisCacheTables setName, long key)
 {
     return(db.HashDelete(setName.ToString(), key));
 }
 public bool SetHash(RedisCacheTables tableName, long key, Object value)
 {
     return(db.HashSet(tableName.ToString(), key, Newtonsoft.Json.JsonConvert.SerializeObject(value)));
 }
 public bool SetHash(RedisCacheTables tableName, String key, string value)
 {
     return(db.HashSet(tableName.ToString(), key, value));
 }