function CacheCollector::invalidateCache

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::invalidateCache()
  2. 8.9.x core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::invalidateCache()
  3. 11.x core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::invalidateCache()

Invalidate the cache.

3 calls to CacheCollector::invalidateCache()
CacheCollector::delete in core/lib/Drupal/Core/Cache/CacheCollector.php
Deletes the element.
CacheCollector::set in core/lib/Drupal/Core/Cache/CacheCollector.php
Implements \Drupal\Core\Cache\CacheCollectorInterface::set().
State::invalidateCache in core/lib/Drupal/Core/State/State.php
Invalidate the cache.
1 method overrides CacheCollector::invalidateCache()
State::invalidateCache in core/lib/Drupal/Core/State/State.php
Invalidate the cache.

File

core/lib/Drupal/Core/Cache/CacheCollector.php, line 361

Class

CacheCollector
Default implementation for CacheCollectorInterface.

Namespace

Drupal\Core\Cache

Code

protected function invalidateCache() {
    // Invalidate the cache to make sure that other requests immediately see the
    // deletion before this request is terminated.
    $this->cache
        ->invalidate($this->getCid());
    $this->cacheInvalidated = TRUE;
}

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