private static T ConvertObj <T>(RedisValue value) { if (value == RedisValue.Null) { return(default(T)); } if (typeof(T) == typeof(string)) { return(value.CastTo <T>()); } return(JsonConvert.DeserializeObject <T>(value)); }