ApcuBackend::invalidateMultiple

public ApcuBackend::invalidateMultiple(array $cids) Marks cache items as invalid. Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE. Parameters string[] $cids: An array of cache IDs to invalidate. Overrides CacheBackendInterface::invalidateMultiple See also \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple() \Drupal\Core\Cache\CacheBackendInterface::invalidate() \Drupal\Core\Cache\CacheBackendInterface::invalidateAll() File core/lib/Drupal/Co

ApcuBackend::invalidateAll

public ApcuBackend::invalidateAll() Marks all cache items as invalid. Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE. Overrides CacheBackendInterface::invalidateAll See also \Drupal\Core\Cache\CacheBackendInterface::deleteAll() \Drupal\Core\Cache\CacheBackendInterface::invalidate() \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple() File core/lib/Drupal/Core/Cache/ApcuBackend.php, line 243 Class ApcuBackend Stores cache items in th

ApcuBackend::set

public ApcuBackend::set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = array()) Stores data in the persistent cache. Core cache implementations set the created time on cache item with microtime(TRUE) rather than REQUEST_TIME_FLOAT, because the created time of cache items should match when they are created, not when the request started. Apart from being more accurate, this increases the chance an item will legitimately be considered valid. Parameters string $cid: T

ApcuBackend::setMultiple

public ApcuBackend::setMultiple(array $items = array()) Store multiple items in the persistent cache. Parameters array $items: An array of cache items, keyed by cid. In the form: $items = array( $cid => array( // Required, will be automatically serialized if not a string. 'data' => $data, // Optional, defaults to CacheBackendInterface::CACHE_PERMANENT. 'expire' => CacheBackendInterface::CACHE_PERMANENT, // (optional) The cache tags for this item, se

ApcuBackend::getMultiple

public ApcuBackend::getMultiple(&$cids, $allow_invalid = FALSE) Returns data from the persistent cache when given an array of cache IDs. Parameters array $cids: An array of cache IDs for the data to retrieve. This is passed by reference, and will have the IDs successfully returned from cache removed. bool $allow_invalid: (optional) If TRUE, cache items may be returned even if they have expired or been invalidated. Such items may sometimes be preferred, if the alternative is recalculating t

ApcuBackend::getApcuKey

public ApcuBackend::getApcuKey($cid) Prepends the APCu user variable prefix for this bin to a cache item ID. Parameters string $cid: The cache item ID to prefix. Return value string The APCu key for the cache item ID. File core/lib/Drupal/Core/Cache/ApcuBackend.php, line 66 Class ApcuBackend Stores cache items in the Alternative PHP Cache User Cache (APCu). Namespace Drupal\Core\Cache Code public function getApcuKey($cid) { return $this->binPrefix . $cid; }

ApcuBackend::getAll

protected ApcuBackend::getAll($prefix = '') Returns all cached items, optionally limited by a cache ID prefix. APCu is a memory cache, shared across all server processes. To prevent cache item clashes with other applications/installations, every cache item is prefixed with a unique string for this site. Therefore, functions like apcu_clear_cache() cannot be used, and instead, a list of all cache items belonging to this application need to be retrieved through this method instead. Parameters st

ApcuBackend::getIterator

protected ApcuBackend::getIterator($search = NULL, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) Instantiates and returns the APCUIterator class. Parameters mixed $search: A PCRE regular expression that matches against APC key names, either as a string for a single regular expression, or as an array of regular expressions. Or, optionally pass in NULL to skip the search. int $format: The desired format, as configured with one or more of the APC_ITER_* constants. int $chunk

ApcuBackend::invalidate

public ApcuBackend::invalidate($cid) Marks a cache item as invalid. Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE. Parameters string $cid: The cache ID to invalidate. Overrides CacheBackendInterface::invalidate See also \Drupal\Core\Cache\CacheBackendInterface::delete() \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple() \Drupal\Core\Cache\CacheBackendInterface::invalidateAll() File core/lib/Drupal/Core/Cache/ApcuBackend.php, line 227

ApcuBackend::deleteMultiple

public ApcuBackend::deleteMultiple(array $cids) Deletes multiple items from the cache. If the cache items are being deleted because they are no longer "fresh", you may consider using invalidateMultiple() instead. This allows callers to retrieve the invalid items by calling get() with $allow_invalid set to TRUE. In some cases an invalid item may be acceptable rather than having to rebuild the cache. Parameters array $cids: An array of cache IDs to delete. Overrides CacheBackendInterface::delete