You are here

function hook_invalidate_cache_tags in Drupal 8 Cache Backport 7

Allows to react to invalidating cache tags.

This hook is useful to e.g. invalidate the tags within an external reverse proxy like Varnish.

Parameters

array $tags: The cache tags that should be invalidated.

4 functions implement hook_invalidate_cache_tags()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

d8cache_do_invalidate_cache_tags in ./d8cache.module
Perform cache tag invalidations. Must do outside of a transaction.
d8cache_invalidate_cache_tags in ./d8cache.module
Implements hook_invalidate_cache_tags().
d8cache_OLD_invalidate_cache_tags in ./d8cache.module
Backwards compatible version of d8cache_invalidate_cache_tags(). This will automatically be used when the core patch to implement end of transaction callbacks is missing.
drush_d8cache_invalidate_cache_tags in ./d8cache.drush.inc
Drush command logic.
1 invocation of hook_invalidate_cache_tags()
core.inc in includes/core.inc
Core functions for the D8 caching system backport.

File

./d8cache.api.php, line 67
API documentation for D8Cache.

Code

function hook_invalidate_cache_tags($tags) {
  mycustom_module_varnish_clear_cache_tags($tags);
}