mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进redis的get方法
This commit is contained in:
2
library/think/cache/driver/Redis.php
vendored
2
library/think/cache/driver/Redis.php
vendored
@@ -80,7 +80,7 @@ class Redis extends Driver
|
|||||||
public function get($name, $default = false)
|
public function get($name, $default = false)
|
||||||
{
|
{
|
||||||
$value = $this->handler->get($this->getCacheKey($name));
|
$value = $this->handler->get($this->getCacheKey($name));
|
||||||
if (is_null($value)) {
|
if (is_null($value) || false === $value) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$jsonData = json_decode($value, true);
|
$jsonData = json_decode($value, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user