From b871e364421bab7750025cfdba007d6f740672f2 Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Thu, 8 Dec 2022 13:47:10 +0100 Subject: [PATCH] BUGFIX: Return number of flushed entries as expected --- Classes/RedisBackend.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Classes/RedisBackend.php b/Classes/RedisBackend.php index 4082037..256e812 100644 --- a/Classes/RedisBackend.php +++ b/Classes/RedisBackend.php @@ -278,14 +278,17 @@ public function flushByTag(string $tag): int /** * Unoptimized implementation for flushing multiple tags * - * @param array $tags - * @return int + * @param array $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; } /**