function ApcuBackend::getAll
Same name in other branches
- 9 core/lib/Drupal/Core/Cache/ApcuBackend.php \Drupal\Core\Cache\ApcuBackend::getAll()
- 8.9.x core/lib/Drupal/Core/Cache/ApcuBackend.php \Drupal\Core\Cache\ApcuBackend::getAll()
- 11.x core/lib/Drupal/Core/Cache/ApcuBackend.php \Drupal\Core\Cache\ApcuBackend::getAll()
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
string $prefix: (optional) A cache ID prefix to limit the result to.
Return value
\APCUIterator An APCUIterator containing matched items.
1 call to ApcuBackend::getAll()
- ApcuBackend::invalidateAll in core/
lib/ Drupal/ Core/ Cache/ ApcuBackend.php - Marks all cache items as invalid.
File
-
core/
lib/ Drupal/ Core/ Cache/ ApcuBackend.php, line 134
Class
- ApcuBackend
- Stores cache items in the Alternative PHP Cache User Cache (APCu).
Namespace
Drupal\Core\CacheCode
protected function getAll($prefix = '') {
return $this->getIterator('/^' . preg_quote($this->getApcuKey($prefix), '/') . '/');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.