function 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
View::postSave in core/modules/views/src/Entity/View.php

File

core/modules/views/src/Views.php, line 609

Class

Views
Static service container wrapper for views.

Namespace

Drupal\views

Code

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.