zendframework/zf2 — pull request #5829 by cgmartin (2014-02-15 04:21:23+00:00)
Title: Memcache adapter

Cache storage adapter for [ext/memcache](http://us3.php.net/manual/en/class.memcache.php) (not to be confused with existing ext/memcached adapter).

Implements feature request: https://github.com/zendframework/zf2/issues/4481

An example configuration for `Zend\Cache\StorageFactory` would be:
```php
$memcacheStorageAdapter = \Zend\Cache\StorageFactory::factory(array(
'adapter' => array(
'name' => 'memcache',
'options' => array(
'compression' => false, // use compression on all writes when able?
'servers' => array(
0 => array('host' => '10.0.0.20', 'port' => 11211), // shorthand, server_defaults will be applied
1 => array('host' => '10.0.0.21', 'port' => 11211, 'status' => true),
2 => array('host' => '10.0.0.22', 'port' => 11211, 'status' => true, 'weight' => 3,
'persistent' => false, 'timeout' => 2, 'retry_interval' => 20), // or can specify all values
),
'server_defaults' => array(
// defaults that are applied to servers with missing values
'weight' => 1,
'persistent' => true,
'timeout' => 1,
'retry_interval' => 15,
),
'lib_options' => array(
'compress_threshold' => array('threshold' => 100, 'min_savings' => 0.2),
),
),
),
));
```