mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进Redis缓存驱动
This commit is contained in:
6
library/think/cache/driver/Redis.php
vendored
6
library/think/cache/driver/Redis.php
vendored
@@ -92,9 +92,7 @@ class Redis
|
|||||||
if ($this->options['length'] > 0) {
|
if ($this->options['length'] > 0) {
|
||||||
// 记录缓存队列
|
// 记录缓存队列
|
||||||
$queue = $this->handler->get('__info__');
|
$queue = $this->handler->get('__info__');
|
||||||
if (!$queue) {
|
$queue = explode(',', $queue);
|
||||||
$queue = [];
|
|
||||||
}
|
|
||||||
if (false === array_search($name, $queue)) {
|
if (false === array_search($name, $queue)) {
|
||||||
array_push($queue, $name);
|
array_push($queue, $name);
|
||||||
}
|
}
|
||||||
@@ -105,7 +103,7 @@ class Redis
|
|||||||
// 删除缓存
|
// 删除缓存
|
||||||
$this->handler->delete($key);
|
$this->handler->delete($key);
|
||||||
}
|
}
|
||||||
$this->handler->set('__info__', $queue);
|
$this->handler->set('__info__', implode(',', $queue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
Reference in New Issue
Block a user