(PECL memcached >= 0.1.0)
Memcached::fetch — 抓取锟斤拷一锟斤拷锟斤拷锟�
Memcached::fetch()锟斤拷锟斤拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟阶ト★拷锟揭伙拷锟斤拷锟斤拷锟斤拷
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟斤拷锟斤拷锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟铰凤拷锟斤拷FALSE
锟斤拷
锟斤拷锟斤拷锟斤拷锟斤拷锟窖撅拷抓取锟斤拷希锟�Memcached::getResultCode()锟斤拷锟斤拷锟斤拷Memcached::RES_END
锟斤拷
Example #1 Memcached::fetch() 示锟斤拷
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->set('int', 99);
$m->set('string', 'a simple string');
$m->set('array', array(11, 12));
//锟接迟的伙拷取int锟斤拷array锟斤拷锟斤拷锟斤拷key锟斤拷值
$m->getDelayed(array('int', 'array'), true);
//循锟斤拷抓取锟斤拷锟斤拷锟斤拷映锟阶ト★拷玫锟斤拷慕锟斤拷
while ($result = $m->fetch()) {
var_dump($result);
}
?>
锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�
array(3) { ["key"]=> string(3) "int" "value"]=> int(99) ["cas"]=> float(2363) } array(3) { ["key"]=> string(5) "array" ["value"]=> array(2) { [0]=> int(11) [1]=> int(12) } ["cas"]=> float(2365) }