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