RWOverdijk/AssetManager — pull request #127 by wshafer (2014-04-13 07:36:20+00:00)
Title: Added Zend Cache Adapter

Added a Zend Cache Adapter so one can reuse the applications configured cache. This should open up a whole range of caches like Zend Server, Memcached, etc.

To use you must have a configured service for Zend Cache. Please see the [docs](http://framework.zend.com/manual/2.0/en/modules/zend.cache.storage.adapter.html) for a detailed walk through on how to setup Zend Cache.

Sample module config:
```php
array(
'caching' => array(
'default' => array(
'cache' => 'ZendCache',
'options' => array(
'service' => 'myAppCache'
),
),
),
),
);
```

A sample configuration for Zend Cache using Memcached as a back end might go as follows:

File: module/Application/Module.php
```php
array(
'myAppCache' => function ($serviceLocator) {
$config = array(
'adapter' => array(
'name' => 'Memcached',
'options' => array(
'servers' => array(
array('localhost','11211'),
),
'namespace' => 'zfcache',
),
),
'plugins' => array(),
);

return StorageFactory::factory($config);
},
),
);
}
}
```