/** * {@inheritdoc} */ public function getCacheTags() { // @todo https://www.drupal.org/node/2779933 write a test for this. $tags = parent::getCacheTags(); // Tab changes if node or node-type is modified. $tags = array_merge($tags, $this->entity->getCacheTags()); $tags[] = $this->entity->getEntityType()->getBundleEntityType() . ':' . $this->entity->bundle(); return $tags; }