You are here

protected function ApcuBackend::getIterator in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cache/ApcuBackend.php \Drupal\Core\Cache\ApcuBackend::getIterator()

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_size: The chunk size. Must be a value greater than 0. The default value is 100.

int $list: The type to list. Either pass in APC_LIST_ACTIVE or APC_LIST_DELETED.

Return value

\APCUIterator

3 calls to ApcuBackend::getIterator()
ApcuBackend::deleteAll in core/lib/Drupal/Core/Cache/ApcuBackend.php
Deletes all cache items in a bin.
ApcuBackend::getAll in core/lib/Drupal/Core/Cache/ApcuBackend.php
Returns all cached items, optionally limited by a cache ID prefix.
ApcuBackend::removeBin in core/lib/Drupal/Core/Cache/ApcuBackend.php
Remove a cache bin.

File

core/lib/Drupal/Core/Cache/ApcuBackend.php, line 269

Class

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

Namespace

Drupal\Core\Cache

Code

protected function getIterator($search = NULL, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) {
  return new \APCUIterator($search, $format, $chunk_size, $list);
}