You are here

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()
core.inc in includes/core.inc
Core functions for the D8 caching system backport.

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';
  }
}