APCIterator
class APCIterator implements Iterator (View source)
The APCIterator class
The APCIterator class makes it easier to iterate over large APC caches. This is helpful as it allows iterating over large caches in steps, while grabbing a defined number of entries per lock instance, so it frees the cache locks for other activities rather than hold up the entire cache to grab 100 (the default) entries. Also, using regular expression matching is more efficient as it's been moved to the C level.
Methods
Constructs an APCIterator iterator object
Rewinds back the iterator to the first element
Checks if the current iterator position is valid
Gets the current item from the APCIterator stack
Gets the current iterator key
Moves the iterator pointer to the next element
Gets the total number of cache hits
Gets the total cache size
Get the total count
Details
__construct(string $cache, string|string[]|null $search = null, int $format = APC_ITER_ALL, int $chunk_size = 100, int $list = APC_LIST_ACTIVE)
Constructs an APCIterator iterator object
void
rewind()
Rewinds back the iterator to the first element
bool
valid()
Checks if the current iterator position is valid
mixed
current()
Gets the current item from the APCIterator stack
mixed
key()
Gets the current iterator key
void
next()
Moves the iterator pointer to the next element
int|false
getTotalHits()
Gets the total number of cache hits
int|bool
getTotalSize()
Gets the total cache size
int|bool
getTotalCount()
Get the total count