php apc_fetch所有ids

Ale*_*lex 8 php caching outputcache apc

有没有办法获取和打印存储在apc存储中的所有数据?

我需要这样做以进行测试和调试.

我知道我可以通过执行来检索特定数据apc_fetch(id),但我不知道通过传递(作为示例)来检索所有数据的任何方法*

lon*_*day 13

是的,你可以得到这个APCIterator.这允许您遍历存储在APC中的所有项目.

$iter = new APCIterator('user');
foreach ($iter as $item) {
    echo $item['key'] . ': ' . $item['value'];
}
Run Code Online (Sandbox Code Playgroud)