zendframework/zf2 — pull request #2876 by marc-mabe (2012-10-31 20:43:34+00:00)
Title: [WIP] memcached changes

**Work in Progress**

- implemented namespace support manually to not change `Memcached::OPT_PREFIX_KEY` on a shared memcached resource
- added `Zend\Cache\Storage\Adapter\MemcachedResourceManager` that handles memcached resources
- an instance of it can be given as a storage option `resource_manager` else it will be auto-instantiated by `MemcachedOptions`
- memcached configuration options will be directed into the resource menager
- it will lazy load the memcached resource by sharing it over adapters
- it supports to change resource options after instantiating a resource

- removed the default server configuration `127.0.0.1:11211`
- could result in a connection to a wrong server be simply forget configuring it
- memcached as a local only server doesn't make sense because it's better to storare into memory directly in such cases ( like `APC` )
- support persistent connections `persistent_id`
- changed default weight to 0 ( defined by `Memcached::addServer` )

**It should be backward compatible but some methods of `MemcachedOptions` marked deprecated:**
- `getMemcachedResource` `setMemcachedResource` Please use the resource manager instead
- `addServer` Please use the resource manager instead
- `getLibOption` `setLibOption` Please use `lib_options` or the resource manager instead

Open for discussion ;)