function views_custom_cache_tag_demo_node_presave in Views Custom Cache Tags 8
Implements hook_node_presave().
File
- modules/
demo/ views_custom_cache_tag_demo.module, line 14 - Contains views_custom_cache_tag.module.
Code
function views_custom_cache_tag_demo_node_presave(NodeInterface $node) {
$cache_tag = 'node:type:' . $node
->getType();
Cache::invalidateTags(array(
$cache_tag,
));
}