Cache\Backend\Libmemcached

Class Phalcon\Cache\Backend\Libmemcached

extends abstract class Phalcon\Cache\Backend

implements Phalcon\Cache\BackendInterface

Allows to cache output fragments, PHP data or raw data to a libmemcached backend This adapter uses the special memcached key “_PHCM” to store all the keys internally used by the adapter

// Cache data for 2 days
 $frontCache = new Phalcon\Cache\Frontend\Data(array(
    "lifetime" => 172800
 ));

 //Create the Cache setting memcached connection options
 $cache = new Phalcon\Cache\Backend\Libmemcached($frontCache, array(
     'servers' => array(
         array('host' => 'localhost',
               'port' => 11211,
               'weight' => 1