- First commit to issue fork.
By default, the custom cache tag will only be applied to the views level.
Actually there will be a cache for each views result row. And the cache tag for each row are generated by below code. It will not apply the custom cache tag for the rows.
public function getRowCacheTags(ResultRow $row) {
$tags = !empty($row->_entity) ? $row->_entity->getCacheTags() : [];
if (!empty($row->_relationship_entities)) {
foreach ($row->_relationship_entities as $entity) {
$tags = Cache::mergeTags($tags, $entity->getCacheTags());
}
}
return $tags;
}
Sometime we want to apply the custom tags to the row as well.
Just rewrite the function getRowCacheTags in the module to apply the custom cache tags.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.