memcached - How to store an object in Memcache and how to retrieve it using PHP -
i doing project using mvc architecture. maintaining values in session. 1 of senior developer tell me not right procedure , suggest me store values in cache.
is right? if yes, how can using php...
memcache not answer everything, can dramatically increase page loads web applications have lots of load.
the concept store data key-value pairs in memory (a memcache) , retrieve data using key whenever necessary.
here quick example of setting , retrieving data memcache in php:
$memcache = new memcache; $memcache->connect('192.168.1.2', 11211) or die ("unable connect"); $memcache->set(‘key1’, 'value1'); // set data $memcache->get('key1'); // data
read on of this:
http://papermashup.com/using-memcache-with-php/
http://fschiettecatte.wordpress.com/2008/05/15/to-use-or-not-to-use-memcached-that-is-the-question/
http://www.majordojo.com/2007/03/memcached-howto.php
good luck, let me know if have more questions
Comments
Post a Comment