function hook_pre_emit_cache_tags_alter in Drupal 8 Cache Backport 7
Allows to alter the cache tags prior to emitting them.
Parameters
array $tags: The tags that will be emitted via hook_emit_cache_tags().
1 invocation of hook_pre_emit_cache_tags_alter()
File
- ./
d8cache.api.php, line 24 - API documentation for D8Cache.
Code
function hook_pre_emit_cache_tags_alter(&$tags) {
if (arg(0) == 'mymodule') {
$tags[] = 'myspecial-tag';
}
}