/** * {@inheritdoc} */ protected static function invalidateTagsOnDelete(EntityTypeInterface $entity_type, array $entities) { parent::invalidateTagsOnDelete($entity_type, $entities); // The parent doesn't invalidate the entity cache tags on delete because the // config system will invalidate them, but since we're using the parent // page's cache tags, we need to invalidate them special. $tags = []; foreach ($entities as $entity) { $tags = Cache::mergeTags($tags, $entity->getCacheTagsToInvalidate()); } Cache::invalidateTags($tags); }