function hook_views_invalidate_cache
Same name in other branches
- 8.9.x core/modules/views/views.api.php \hook_views_invalidate_cache()
- 10 core/modules/views/views.api.php \hook_views_invalidate_cache()
- 11.x core/modules/views/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
Related topics
1 function implements hook_views_invalidate_cache()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- views_test_data_views_invalidate_cache in core/
modules/ views/ tests/ modules/ views_test_data/ views_test_data.views.inc - Implements hook_views_invalidate_cache().
1 invocation of hook_views_invalidate_cache()
- views_invalidate_cache in core/
modules/ views/ views.module - Invalidate the views cache, forcing a rebuild on the next grab of table data.
File
-
core/
modules/ views/ views.api.php, line 935
Code
function hook_views_invalidate_cache() {
\Drupal\Core\Cache\Cache::invalidateTags([
'views',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.