hook_views_invalidate_cache

hook_views_invalidate_cache()

Allow modules to respond to the invalidation of the Views cache.

This hook will fire whenever a view is enabled, disabled, created, updated, or deleted.

See also

views_invalidate_cache()

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/modules/views/views.api.php, line 955
Describes hooks and plugins provided by the Views module.

Code

function hook_views_invalidate_cache() {
  \Drupal\Core\Cache\Cache::invalidateTags(array('views'));
}
doc_Drupal
2016-10-29 09:18:38
Comments
Leave a Comment

Please login to continue.