Z
Z
zelena2014-06-25 05:32:47
PHP
zelena, 2014-06-25 05:32:47

How to use memcache multiget in PHP?

As far as I understand, this is the ability to group requests to the memcache. But nowhere did I find real examples of how it looks in large applications. In what cases is it better to use it and is it worth it at all? Are there any tricks for combining all requests at once into one group without rewriting the entire code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dan, 2014-06-25
@golotyuk

In practice, it is convenient to use only when selecting lists:

$m = new Memcache;
$posts = $m->get(['post1', 'post2',...]);
foreach ( $posts as $post ) echo $post['caption'];

Read more here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question