function 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.