We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6c8c82d + 0ab0ef8 commit 167c5adCopy full SHA for 167c5ad
2 files changed
CacheTagsBundle/Listener/InvalidatorListener.php
@@ -28,16 +28,9 @@ public function invalidate()
28
{
29
$tags = $this->repository->getTags();
30
31
- $uniqTags = [];
32
foreach ($tags as $tag)
33
34
- $tagValue = $tag->getCacheTag();
35
- $uniqTags[$tagValue] = $tagValue;
36
- }
37
-
38
- foreach ($uniqTags as $tagValue)
39
- {
40
- $this->invalidateTag($tagValue);
+ $this->invalidateTag($tag->getCacheTag());
41
}
42
43
CacheTagsBundle/Service/Repository.php
@@ -20,7 +20,7 @@ class Repository
20
*/
21
public function add(CacheTagInterface $tag)
22
23
- $this->tags[] = $tag;
+ $this->tags[$tag->getCacheTag()] = $tag;
24
25
26
/**
0 commit comments