Iterating over Entries

suggest change

APCUIterator walks entries in the APCu cache. It needs the APCu extension:

foreach (new APCUIterator() as $entry) {
    print_r($entry);
}

Pass a regular expression to select matching keys. $regex must be defined, for example '/^user-/':

foreach (new APCUIterator($regex) as $entry) {
    print_r($entry);
}

Information about a single cache entry can be obtained via:

$key = '…';
$regex = '(^' . preg_quote($key) . '$)';
print_r((new APCUIterator($regex))->current());

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents