mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
改进redis驱动的缓存有效期判断
This commit is contained in:
2
library/think/cache/driver/Redis.php
vendored
2
library/think/cache/driver/Redis.php
vendored
@@ -114,7 +114,7 @@ class Redis extends Driver
|
|||||||
}
|
}
|
||||||
$key = $this->getCacheKey($name);
|
$key = $this->getCacheKey($name);
|
||||||
$value = is_scalar($value) ? $value : 'think_serialize:' . serialize($value);
|
$value = is_scalar($value) ? $value : 'think_serialize:' . serialize($value);
|
||||||
if (is_int($expire) && $expire) {
|
if ($expire) {
|
||||||
$result = $this->handler->setex($key, $expire, $value);
|
$result = $this->handler->setex($key, $expire, $value);
|
||||||
} else {
|
} else {
|
||||||
$result = $this->handler->set($key, $value);
|
$result = $this->handler->set($key, $value);
|
||||||
|
|||||||
Reference in New Issue
Block a user