You are here

function hook_views_invalidate_cache in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 7.3 views.api.php \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

1 invocation of hook_views_invalidate_cache()
views_invalidate_cache in ./views.module
Invalidate the views cache, forcing a rebuild on the next grab of table data.

File

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

Code

function hook_views_invalidate_cache() {
  cache('mymodule')
    ->invalidateTags(array(
    'views' => TRUE,
  ));
}