Skip to content

Commit

Permalink
Merge pull request #59 from Flowpack/bugfix/dont-flush-empty-tags
Browse files Browse the repository at this point in the history
BUGFIX: Don't flush if tags is an empty array
  • Loading branch information
daniellienert committed Jan 31, 2023
2 parents bbd38eb + 34a8b22 commit a4175c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Aspects/ContentCacheAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public function registerDisableContentCache(JoinPointInterface $joinPoint): void
public function interceptContentCacheFlush(JoinPointInterface $joinPoint)
{
$object = $joinPoint->getProxy();

$tags = array_keys(ObjectAccess::getProperty($object, 'tagsToFlush', true));
if ($tags === []) {
return;
}

$this->varnishBanService->banByTags($tags);
}
Expand Down

0 comments on commit a4175c5

Please sign in to comment.