function CacheCollector::reset

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

Overrides CacheCollectorInterface::reset

2 calls to CacheCollector::reset()
CacheCollector::clear in core/lib/Drupal/Core/Cache/CacheCollector.php
Clears the collected cache entry.
LibraryDiscoveryCollector::reset in core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php
Resets the local cache.
1 method overrides CacheCollector::reset()
LibraryDiscoveryCollector::reset in core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php
Resets the local cache.

File

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

Class

CacheCollector
Default implementation for CacheCollectorInterface.

Namespace

Drupal\Core\Cache

Code

public function reset() {
    $this->storage = [];
    $this->keysToPersist = [];
    $this->keysToRemove = [];
    $this->cacheLoaded = FALSE;
}

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