# Zend_Application_Resource_Cachemanager

`Zend_Application_Resource_Cachemanager` may be utilised to configure a set of `Zend_Cache` option bundles for use when lazy loading caches using `Zend_Cache_Manager`

As the Cache Manager is a lazy loading mechanism, the options are translated to option templates used to instantiate a cache object on request.

## Sample Cachemanager resource configuration

Below is a sample INI file showing how `Zend_Cache_Manager` may be configured. The format is the Cachemanager resource prefix (resources.cachemanager) followed be the name to assign to an option cache template or bundle (e.g. resources.cachemanager.database) and finally followed by a typical `Zend_Cache` option.

    resources.cachemanager.database.frontend.name = Core
    resources.cachemanager.database.frontend.options.lifetime = 7200
    resources.cachemanager.database.frontend.options.automatic_serialization = true
    resources.cachemanager.database.backend.name = File
    resources.cachemanager.database.backend.options.cache_dir = "/path/to/cache"

Actually retrieving this cache from the Cache Manager is as simple as accessing an instance of the Manager and calling `$cacheManager->getCache('database');`.