mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +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) {
|
||||
// 记录缓存队列
|
||||
$queue = $this->handler->get('__info__');
|
||||
if (!$queue) {
|
||||
$queue = [];
|
||||
}
|
||||
$queue = explode(',', $queue);
|
||||
if (false === array_search($name, $queue)) {
|
||||
array_push($queue, $name);
|
||||
}
|
||||
@@ -105,7 +103,7 @@ class Redis
|
||||
// 删除缓存
|
||||
$this->handler->delete($key);
|
||||
}
|
||||
$this->handler->set('__info__', $queue);
|
||||
$this->handler->set('__info__', implode(',', $queue));
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user