public function set($key, $value, $expire = 0)
{
$value = json_encode($value, PHP_VERSION >= '5.4.0' ? JSON_UNESCAPED_UNICODE : 0);
if ($expire > 0) {
return $this->hash($key)->setex($key, $expire, $value);
} else {
return $this->hash($key)->set($key, $value);
}
}