Alex
Alex

Reputation: 7688

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 *

Upvotes: 9

Views: 5685

Answers (4)

varadha
varadha

Reputation: 59

APC extension is not installed on your APache.

so download a APc based on your PHP version and install it.

http://downloads.php.net/pierre/

if you need installation tuts. read it here.

http://kvcodes.com/2014/06/solution-call-undefined-function-apc_fetch/

Upvotes: -2

Mark Baker
Mark Baker

Reputation: 212522

apc_cache_info() might be what you're looking for

Upvotes: 2

lonesomeday
lonesomeday

Reputation: 238075

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'];
}

Upvotes: 13

Samy Dindane
Samy Dindane

Reputation: 18746

The APCIterator class might be what you are looking for.

Upvotes: 1

Related Questions