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) backend 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 memcached PECL extension.

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

Available options are :

Table 28. Libmemcached Backend Options

Option Data Type Default Value Description
servers Array array(array('host' => 'localhost', 'port' => 11211, 'weight' => 1)) 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, 'weight' => (int) :the weight of the memcached server
client Array array( Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_HASH => Memcached::HASH_MD5, Memcached::OPT_LIBKETAMA_COMPATIBLE => true ) An associative array of memcached client options ; The array key can be the name of the memcached option constant (without 'OPT_') or the integer value of it. See Memcached constants on PHP manual

Zend Framework