CacheContextInterface

Provides an interface for defining a cache context service. Hierarchy interface \Drupal\Core\Cache\Context\CacheContextInterface File core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php, line 8 Namespace Drupal\Core\Cache\Context Members Name Modifiers Type Description CacheContextInterface::getCacheableMetadata public function Gets the cacheability metadata for the context. CacheContextInterface::getContext public function Returns the string representat

CacheCollectorInterface::delete

public CacheCollectorInterface::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. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 54 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code public function delete($key);

CacheCollectorInterface::get

public CacheCollectorInterface::get($key) Gets value from the cache. Parameters string $key: Key that identifies the data. Return value mixed The corresponding cache data. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 30 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code public function get($key);

CacheCollectorInterface::set

public CacheCollectorInterface::set($key, $value) Sets cache data. 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. mixed $value: The data to be set. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 43 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code publ

CacheCollectorInterface::reset

public CacheCollectorInterface::reset() Resets the local cache. Does not clear the persistent cache. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 69 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code public function reset();

CacheCollectorInterface::has

public CacheCollectorInterface::has($key) Returns whether data exists for this key. Parameters string $key: Key that identifies the data. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 62 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code public function has($key);

CacheCollector::updateCache

protected CacheCollector::updateCache($lock = TRUE) Writes a value to the persistent cache immediately. Parameters bool $lock: (optional) Whether to acquire a lock before writing to cache. Defaults to TRUE. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 218 Class CacheCollector Default implementation for CacheCollectorInterface. Namespace Drupal\Core\Cache Code protected function updateCache($lock = TRUE) { $data = array(); foreach ($this->keysToPersist as $offset =&g

CacheCollector::__construct

public CacheCollector::__construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, array $tags = array()) Constructs a CacheCollector object. Parameters string $cid: The cid for the array being cached. \Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend. \Drupal\Core\Lock\LockBackendInterface $lock: The lock backend. array $tags: (optional) The tags to specify for the cache item. File core/lib/Drupal/Core/Cache/CacheCollector.php, line 113 Class CacheCollecto

CacheCollectorInterface::clear

public CacheCollectorInterface::clear() Clears the collected cache entry. File core/lib/Drupal/Core/Cache/CacheCollectorInterface.php, line 74 Class CacheCollectorInterface Provides a caching wrapper to be used in place of large structures. Namespace Drupal\Core\Cache Code public function clear();

CacheCollectorInterface

Provides a caching wrapper to be used in place of large structures. This should be extended by systems that need to cache large amounts of data to calling functions. These structures can become very large, so this class is used to allow different strategies to be used for caching internally (lazy loading, building caches over time etc.). This can dramatically reduce the amount of data that needs to be loaded from cache backends on each request, and memory usage from static caches of that same d