Skip to content

Commit

Permalink
Merge pull request #2990 from big-dream/8.0-cache-2989
Browse files Browse the repository at this point in the history
标签内的缓存标识列表为空时,不调用 clearTag 方法
  • Loading branch information
big-dream authored May 13, 2024
2 parents cfd9dfb + b4222a2 commit 05942a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/think/cache/TagSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public function clear(): bool
{
// 指定标签清除
foreach ($this->tag as $tag) {
$names = $this->handler->getTagItems($tag);
$this->handler->clearTag($names);
$keys = $this->handler->getTagItems($tag);
if (!empty($keys)) $this->handler->clearTag($keys);

$key = $this->handler->getTagKey($tag);
$this->handler->delete($key);
Expand Down

0 comments on commit 05942a3

Please sign in to comment.