I've implemented CacheableDependencyInterface
on my ViewsField plugin.
/**
* {@inheritdoc}
*/
public function getCacheTags() {
return ['arbitrary_tag'];
}
I can see the tag on the HEADER and the View configuration object.
However, when that tag is invalidated, the View is not updated.
I've also tried using adding cache tags to the render
method:
return [
'#markup' => $message,
'#cache' => [
'tags' => ['my_list'],
],
];
Both to the Views field, but also tried directly on the View element using hook_views_pre_view
While debugging, I've made sure to try invalidate that specific tag:
Cache::invalidateTags(['my_list']);
While debugging further it seems like that the ResultRow values are still cached after clearing the tag.