Skip to content

Commit 59281a9

Browse files
committed
Use entity provided method to get cache tags.
1 parent f59d07c commit 59281a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/next/src/Plugin/Next/Revalidator/CacheTag.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ public function revalidate(EntityActionEvent $event): bool {
5656
return FALSE;
5757
}
5858

59-
$tags = [];
60-
$tags[] = $entity->getEntityTypeId() . ':' . $entity->id();
59+
$tags = $entity->getCacheTags() ?? [];
6160
if ($entity->getEntityTypeId() == 'menu_link_content') {
6261
$tags[] = $entity->getEntityTypeId() . ':' . $entity->getMenuName();
6362
}

0 commit comments

Comments
 (0)