APCUIterator
class APCUIterator implements Iterator (View source)
The APCUIterator class
The APCUIterator class makes it easier to iterate over large APCu 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 APCUIterator iterator object
Rewinds back the iterator to the first element
Checks if the current iterator position is valid
Gets the current item from the APCUIterator 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|string[]|null $search = null, int $format = APC_ITER_ALL, int $chunk_size = 100, int $list = APC_LIST_ACTIVE)
Constructs an APCUIterator 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 APCUIterator 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|false
getTotalSize()
Gets the total cache size
int|false
getTotalCount()
Get the total count