Skip to content

Commit

Permalink
Implement flushByTags()
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlemke committed Apr 7, 2022
1 parent 437ce12 commit 74d38f8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Classes/RedisBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,19 @@ public function flushByTag(string $tag): int
return $this->client->eval($script, 2, $this->buildKey('tag:' . $tag), $this->buildKey('entries'), $this->buildKey(''));
}

/**
* Unoptimized implementation for flushing multiple tags
*
* @param array $tags
* @return int
*/
public function flushByTags(array $tags): int
{
foreach ($tags as $tag) {
$this->flushByTag($tag);
}
}

/**
* Finds and returns all cache entry identifiers which are tagged by the
* specified tag.
Expand Down

0 comments on commit 74d38f8

Please sign in to comment.