改进缓存标签

This commit is contained in:
thinkphp
2017-06-29 16:29:49 +08:00
parent 2615cf99b7
commit 5da8bd962a

View File

@@ -170,8 +170,9 @@ abstract class Driver
$key = 'tag_' . md5($this->tag); $key = 'tag_' . md5($this->tag);
$this->tag = null; $this->tag = null;
if ($this->has($key)) { if ($this->has($key)) {
$value = $this->get($key); $value = explode(',', $this->get($key));
$value .= ',' . $name; $value[] = $name;
$value = implode(',', array_unique($value));
} else { } else {
$value = $name; $value = $name;
} }