mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
Cache类的tag方法支持追加缓存标识
This commit is contained in:
9
library/think/cache/Driver.php
vendored
9
library/think/cache/Driver.php
vendored
@@ -93,9 +93,12 @@ abstract class Driver
|
||||
$this->tag = $name;
|
||||
return $this;
|
||||
} else {
|
||||
$key = 'tag_' . md5($name);
|
||||
$value = is_array($keys) ? implode(',', $keys) : $keys;
|
||||
$this->set($key, $value);
|
||||
$key = 'tag_' . md5($name);
|
||||
if (is_string($keys)) {
|
||||
$keys = explode(',', $keys);
|
||||
}
|
||||
$value = array_unique(array_merge($this->getTagItem($name), $keys));
|
||||
$this->set($key, implode(',', $value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user