Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php apc_fetch all ids

Is there a way to fetch and print, all the data stored in apc's storage?

I need to do so for testing and debugging purposes.

I know I can retrieve a specific data by doing apc_fetch(id), but I don't know any way to retrieve all the data by passing (as an example) a *

like image 472
Alex Avatar asked May 29 '12 11:05

Alex


3 Answers

Yes, you can get this with APCIterator. This allows you to loop through all the items stored with APC.

$iter = new APCIterator('user');
foreach ($iter as $item) {
    echo $item['key'] . ': ' . $item['value'];
}
like image 54
lonesomeday Avatar answered Oct 21 '22 20:10

lonesomeday


apc_cache_info() might be what you're looking for

like image 42
Mark Baker Avatar answered Oct 21 '22 22:10

Mark Baker


The APCIterator class might be what you are looking for.

like image 25
Samy Dindane Avatar answered Oct 21 '22 22:10

Samy Dindane