Skip to content

Commit

Permalink
Merge pull request #29 from daniellienert/bugfix/return-flushed-entries
Browse files Browse the repository at this point in the history
BUGFIX: Return number of flushed entries as expected
  • Loading branch information
kdambekalns authored Mar 27, 2023
2 parents fcf658d + b871e36 commit e2b6bcd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Classes/RedisBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,17 @@ public function flushByTag(string $tag): int
/**
* Unoptimized implementation for flushing multiple tags
*
* @param array $tags
* @return int
* @param array<string> $tags The tags the entries must have
* @return integer The number of entries which have been affected by this flush
*
*/
public function flushByTags(array $tags): int
{
$flushedTags = 0;
foreach ($tags as $tag) {
$this->flushByTag($tag);
$flushedTags += $this->flushByTag($tag);
}
return $flushedTags;
}

/**
Expand Down

0 comments on commit e2b6bcd

Please sign in to comment.