(PECL memcached >= 0.1.0)
Memcached::getDelayed — 锟斤拷锟斤拷锟斤拷元锟斤拷
Memcached::getDelayed()锟斤拷Memcached锟斤拷锟斤拷朔锟斤拷锟揭伙拷锟斤拷锟斤拷锟�keys
指锟斤拷锟侥讹拷锟�
key锟斤拷应元锟截碉拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟饺达拷锟斤拷应锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟截★拷锟斤拷锟斤拷锟斤拷要锟秸硷拷元锟斤拷值时锟斤拷 锟斤拷锟斤拷Memcached::fetch()锟斤拷
Memcached::fetchAll()锟斤拷锟斤拷锟�with_cas
锟斤拷锟斤拷为true锟斤拷锟斤拷同时锟斤拷锟斤拷每锟斤拷元锟截碉拷CAS锟斤拷恰锟�
锟斤拷锟斤拷通锟斤拷锟斤拷锟斤拷value_cb
指锟斤拷一锟斤拷result callback锟斤拷锟斤拷锟斤拷锟饺凤拷锟阶ト★拷锟斤拷锟斤拷fetch锟斤拷fetchAll为锟斤拷确抓取锟斤拷式锟斤拷锟斤拷
keys
要锟斤拷锟斤拷锟絢ey锟斤拷锟斤拷锟介。
with_cas
锟角凤拷同时锟斤拷锟斤拷CAS锟斤拷恰锟�
value_cb
锟斤拷锟斤拷氐锟斤拷锟斤拷锟斤拷锟�NULL
锟斤拷
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
锟斤拷锟斤拷要锟斤拷使锟斤拷 Memcached::getResultCode()锟斤拷
Example #1 Memcached::getDelayed() 示锟斤拷
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->set('int', 99);
$m->set('string', 'a simple string');
$m->set('array', array(11, 12));
$m->getDelayed(array('int', 'array'), true);
var_dump($m->fetchAll());
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
array(2) { [0]=> array(3) { ["key"]=> string(3) "int" ["value"]=> int(99) ["cas"]=> float(2363) } [1]=> array(3) { ["key"]=> string(5) "array" ["value"]=> array(2) { [0]=> int(11) [1]=> int(12) } ["cas"]=> float(2365) } }