You are here

public function View::invalidateCaches in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::invalidateCaches()
  2. 9 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::invalidateCaches()

Invalidates cache tags.

1 call to View::invalidateCaches()
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/Entity/View.php, line 471

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function invalidateCaches() {

  // Invalidate cache tags for cached rows.
  $tags = $this
    ->getCacheTags();
  \Drupal::service('cache_tags.invalidator')
    ->invalidateTags($tags);
}