Iterating over Entries
suggest changeAPCUIterator 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());
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents