问题描述
- php memcache遍历问题
- $memcache = new Memcache;
$memcache->connect('127.0.0.1' 11211) or die (""Could not connect to memcache server"");$list = array();
$allSlabs = $memcache->getExtendedStats('slabs');
$items = $memcache->getExtendedStats('items');
foreach($allSlabs as $server => $slabs) {
foreach($slabs AS $slabId => $slabMeta) {
$cdump = $memcache->getExtendedStats('cachedump'(int)$slabId);
foreach($cdump AS $keys => $arrVal) {
foreach($arrVal AS $k => $v){
echo $k .""
"";
}
}
}
}我再网上搜到这种遍历key的方法,但是当数据量超过100了以后,第101条开始就不能遍历出来,必须删掉能遍历出来的数据才能显示后面的数据,求大神给个在不删除任何数据的情况下遍历全部的key
时间: 2024-10-06 09:02:19