Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. View.php

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 470

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);
}
RSS feed
Powered by Drupal