Ben PHP uygulamasında getDelayed ve getMulti nasıl kullanılacağı hakkında biraz son zamanlarda düşünce ve onların fark var.
GetDelayed ilgili belgeleri okuma:
"The method does not wait for response and returns right away. When you are ready to collect the items, call either Memcached::fetch or Memcached::fetchAll."
So obviously there's a need to call fetchAll before having the keys available, unlike getMulti. But when is the actual memcached call being done?
At fetchAll or when getDelayed is run?
Örneğin ile güncellendi:
$this->memcached->set('int', 99);
$this->memcached->set('string', 'a simple string');
$this->memcached->set('array', array(11, 12));
$this->memcached->getDelayed(array('int'));
$this->memcached->getDelayed(array('string'));
$this->memcached->getDelayed(array('array'));
print("<pre>".print_r( $this->memcached->fetchAll() )."</pre>"); // returns the array element only.