/** * {@inheritdoc} */ public function getCacheTags() { $tags = parent::getCacheTags(); return Cache::mergeTags($tags, ['block_visibility_group:' . $this->id]); }
/** * {@inheritdoc} * * Block configuration entities are a special case: one block entity stores * the placement of one block in one theme. Changing these entities may affect * any page that is rendered in a certain theme, even if the block doesn't * appear there currently. Hence a block configuration entity must also return * the associated theme's cache tag. */ public function getCacheTags() { return Cache::mergeTags(parent::getCacheTags(), ['theme:' . $this->theme]); }