You are here

protected function ApcuRawBackend::getAll in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::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

\APCIterator An APCIterator containing matched items.

File

src/Cache/ApcuRawBackend.php, line 160
Contains \Drupal\supercache\Cache\ApcuRawBackend.

Class

ApcuRawBackend
Stores cache items in the Alternative PHP Cache User Cache (APCu).

Namespace

Drupal\supercache\Cache

Code

protected function getAll($prefix = '') {
  return new \APCIterator('user', '/^' . preg_quote($this
    ->getApcuKey($prefix), '/') . '/');
}