function Views::invalidateCache
Same name and namespace in other branches
- 11.x core/modules/views/src/Views.php \Drupal\views\Views::invalidateCache()
Invalidates views data cache.
3 calls to Views::invalidateCache()
- AdvancedSettingsForm::cacheSubmit in core/
modules/ views_ui/ src/ Form/ AdvancedSettingsForm.php - Submission handler to clear the Views cache.
- View::postDelete in core/
modules/ views/ src/ Entity/ View.php - Acts on deleted entities before the delete hook is invoked.
- View::postSave in core/
modules/ views/ src/ Entity/ View.php - Acts on a saved entity before the insert or update hook is invoked.
File
-
core/
modules/ views/ src/ Views.php, line 609
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function invalidateCache() : void {
\Drupal::service('cache_tags.invalidator')->invalidateTags([
'views_data',
]);
// Allow modules to respond to the Views cache being cleared.
\Drupal::moduleHandler()->invokeAll('views_invalidate_cache');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.