Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store


This (extended) backends stores cache records into a memcached server. memcached is a high-performance, distributed memory object caching system. To use this backend, you need a memcached daemon and the memcache PECL extension.

Be careful : with this backend, "tags" are not supported for the moment as the "doNotTestCacheValidity=true" argument.

Available options are :

Table 27. Memcached Backend Options

Option Data Type Default Value Description
servers Array array(array('host' => 'localhost', 'port' => 11211, 'persistent' => true, 'weight' => 1, 'timeout' => 5, 'retry_interval' => 15, 'status' => true, 'failure_callback' => '' )) An array of memcached servers ; each memcached server is described by an associative array : 'host' => (string) : the name of the memcached server, 'port' => (int) : the port of the memcached server, 'persistent' => (bool) : use or not persistent connections to this memcached server 'weight' => (int) :the weight of the memcached server, 'timeout' => (int) :the time out of the memcached server, 'retry_interval' => (int) :the retry interval of the memcached server, 'status' => (bool) :the status of the memcached server, 'failure_callback' => (callback) : the failure_callback of the memcached server
compression Boolean FALSE TRUE if you want to use on-the-fly compression
compatibility Boolean FALSE TRUE if you want to use this compatibility mode with old memcache servers or extensions

Zend Framework