Cache/Manager.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cache
- Version
- $Id: Manager.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Cache_Manager
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties

array $_caches = array()Array of caches stored by the Cache Manager instance
array()Details- Type
- array

array $_optionTemplates = array('default' => array('frontend' => array('name' => 'Core', 'options' => array('automatic_serialization' => true)), 'backend' => array('name' => 'File', 'options' => array())), 'page' => array('frontend' => array('name' => 'Capture', 'options' => array('ignore_user_abort' => true)), 'backend' => array('name' => 'Static', 'options' => array('public_dir' => '../public'))), 'pagetag' => array('frontend' => array('name' => 'Core', 'options' => array('automatic_serialization' => true, 'lifetime' => null)), 'backend' => array('name' => 'File', 'options' => array())))Array of ready made configuration templates for lazy loading caches.
array('default' => array('frontend' => array('name' => 'Core', 'options' => array('automatic_serialization' => true)), 'backend' => array('name' => 'File', 'options' => array())), 'page' => array('frontend' => array('name' => 'Capture', 'options' => array('ignore_user_abort' => true)), 'backend' => array('name' => 'Static', 'options' => array('public_dir' => '../public'))), 'pagetag' => array('frontend' => array('name' => 'Core', 'options' => array('automatic_serialization' => true, 'lifetime' => null)), 'backend' => array('name' => 'File', 'options' => array())))Details- Type
- array
Methods

_mergeOptions(array $current, array $options) : arraySimple method to merge two configuration arrays
| Name | Type | Description |
|---|---|---|
| $current | array | |
| $options | array |
| Type | Description |
|---|---|
| array |

getCache(string $name) : \Zend_Cache_CoreFetch the named cache object, or instantiate and return a cache object using a named configuration template
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Cache_Core |

getCacheTemplate(string $name) : arrayGet the named configuration template
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| array |

getCaches() : arrayFetch all available caches
| Type | Description |
|---|---|
| array | An array of all available caches with it's names as key |

hasCache(string $name) : boolCheck if the Cache Manager contains the named cache object, or a named configuration template to lazy load the cache object
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |

hasCacheTemplate(string $name) : boolCheck if the named configuration template
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |

setCache(string $name, \Zend_Cache_Core $cache) : \Zend_Cache_ManagerSet a new cache for the Cache Manager to contain
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $cache | \Zend_Cache_Core |
| Type | Description |
|---|---|
| \Zend_Cache_Manager |

setCacheTemplate(string $name, array $options) : \Zend_Cache_ManagerSet a named configuration template from which a cache object can later be lazy loaded
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |
| Type | Description |
|---|---|
| \Zend_Cache_Manager |

setTemplateOptions(string $name, array $options) : \Zend_Cache_ManagerPass an array containing changes to be applied to a named configuration template
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |
| Type | Description |
|---|---|
| \Zend_Cache_Manager |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception | for invalid options format or if option templates do not have $name |