PHP memcached: getDelayed & getMulti - how to use?

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-05-28T12:49:32Z Indexed on 2010/05/28 12:51 UTC
Read the original article Hit count: 156

Filed under:
|
|

Hi everybody,

I have thought a bit recently about how to use getDelayed and getMulti in a PHP application, and their difference.

From reading the documentation about getDelayed:

"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?

© Stack Overflow or respective owner

Related posts about php

Related posts about memcached