Skip to content
Snippets Groups Projects

Fixing CE cache dependency

Files
3
@@ -207,6 +207,21 @@ class EntityCeDisplay extends EntityDisplayBase implements EntityCeDisplayInterf
@@ -207,6 +207,21 @@ class EntityCeDisplay extends EntityDisplayBase implements EntityCeDisplayInterf
];
];
}
}
 
/**
 
* {@inheritdoc}
 
*/
 
public function getCacheTagsToInvalidate() {
 
$tags = parent::getCacheTagsToInvalidate();
 
// $tags is a single tag, ending in the view mode. When using the default
 
// display to build a specific view mode, also add a tag for that view mode.
 
$tag = current($tags);
 
if ($this->originalMode !== 'default' && substr($tag, -8) === '.default') {
 
$tags[] = substr($tag, 0, strlen($tag) - 7) . $this->originalMode;
 
}
 
 
return $tags;
 
}
 
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
Loading