CacheCollector::reset

public CacheCollector::reset() Resets the local cache. Does not clear the persistent cache. Overrides CacheCollectorInterface::reset File core/lib/Drupal/Core/Cache/CacheCollector.php, line 290 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code public function reset() { $this->storage = array(); $this->keysToPersist = array(); $this->keysToRemove = array(); $this->cacheLoaded = FALSE; }

CacheCollector::resolveCacheMiss

abstract protected CacheCollector::resolveCacheMiss($key) Resolves a cache miss. When an offset is not found in the object, this is treated as a cache miss. This method allows classes using this implementation to look up the actual value and allow it to be cached. Parameters string $key: The offset that was requested. Return value mixed The value of the offset, or NULL if no value was found. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 209 Class CacheCollector Default impleme

CacheCollector::normalizeLockName

protected CacheCollector::normalizeLockName($cid) Normalizes a cache ID in order to comply with database limitations. Parameters string $cid: The passed in cache ID. Return value string An ASCII-encoded cache ID that is at most 255 characters long. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 272 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code protected function normalizeLockName($cid) { // Nothing to do if the I

CacheCollector::set

public CacheCollector::set($key, $value) Implements \Drupal\Core\Cache\CacheCollectorInterface::set(). This is not persisted by default. In practice this means that setting a value will only apply while the object is in scope and will not be written back to the persistent cache. This follows a similar pattern to static vs. persistent caching in procedural code. Extending classes may wish to alter this behavior, for example by adding a call to persist(). Overrides CacheCollectorInterface::set Fi

CacheCollector::persist

protected CacheCollector::persist($key, $persist = TRUE) Flags an offset value to be written to the persistent cache. Parameters string $key: The key that was requested. bool $persist: (optional) Whether the offset should be persisted or not, defaults to TRUE. When called with $persist = FALSE the offset will be unflagged so that it will not be written at the end of the request. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 192 Class CacheCollector Default implementation for Ca

CacheCollector::lazyLoadCache

protected CacheCollector::lazyLoadCache() Loads the cache if not already done. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 320 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code protected function lazyLoadCache() { if ($this->cacheLoaded) { return; } // The cache was not yet loaded, set flag to TRUE. $this->cacheLoaded = TRUE; if ($cache = $this->cache->get($this->getCid())) { $this-&g

CacheCollector::get

public CacheCollector::get($key) Gets value from the cache. Parameters string $key: Key that identifies the data. Return value mixed The corresponding cache data. Overrides CacheCollectorInterface::get File core/lib/Drupal/Core/Cache/CacheCollector.php, line 142 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code public function get($key) { $this->lazyLoadCache(); if (isset($this->storage[$key]) || array_key_exists($key,

CacheCollector::destruct

public CacheCollector::destruct() Performs destruct operations. Overrides DestructableInterface::destruct File core/lib/Drupal/Core/Cache/CacheCollector.php, line 313 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code public function destruct() { $this->updateCache(); }

CacheCollector::delete

public CacheCollector::delete($key) Deletes the element. It depends on the specific case and implementation whether this has a permanent effect or if it just affects the current request. Parameters string $key: Key that identifies the data. Overrides CacheCollectorInterface::delete File core/lib/Drupal/Core/Cache/CacheCollector.php, line 173 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code public function delete($key) { $this-

CacheCollector::getCid

protected CacheCollector::getCid() Gets the cache ID. Return value string File core/lib/Drupal/Core/Cache/CacheCollector.php, line 126 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code protected function getCid() { return $this->cid; }