Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Cache_Manager Class Reference

Public Member Functions

 setCache ($name, Zend_Cache_Core $cache)
 Set a new cache for the Cache Manager to contain.
 
 hasCache ($name)
 Check if the Cache Manager contains the named cache object, or a named configuration template to lazy load the cache object.
 
 getCache ($name)
 Fetch the named cache object, or instantiate and return a cache object using a named configuration template.
 
 getCaches ()
 Fetch all available caches.
 
 setCacheTemplate ($name, $options)
 Set a named configuration template from which a cache object can later be lazy loaded.
 
 hasCacheTemplate ($name)
 Check if the named configuration template.
 
 getCacheTemplate ($name)
 Get the named configuration template.
 
 setTemplateOptions ($name, $options)
 Pass an array containing changes to be applied to a named configuration template.
 

Public Attributes

const PAGECACHE = 'page'
 Constant holding reserved name for default Page Cache.
 
const PAGETAGCACHE = 'pagetag'
 Constant holding reserved name for default Page Tag Cache.
 

Protected Member Functions

 _mergeOptions (array $current, array $options)
 Simple method to merge two configuration arrays.
 

Protected Attributes

 $_caches = array()
 
 $_optionTemplates
 

Member Function Documentation

_mergeOptions ( array  $current,
array  $options 
)
protected

Simple method to merge two configuration arrays.

Parameters
array$current
array$options
Returns
array
getCache (   $name)

Fetch the named cache object, or instantiate and return a cache object using a named configuration template.

Parameters
string$name
Returns
Zend_Cache_Core
getCaches ( )

Fetch all available caches.

Returns
array An array of all available caches with it's names as key
getCacheTemplate (   $name)

Get the named configuration template.

Parameters
string$name
Returns
array
hasCache (   $name)

Check if the Cache Manager contains the named cache object, or a named configuration template to lazy load the cache object.

Parameters
string$name
Returns
bool
hasCacheTemplate (   $name)

Check if the named configuration template.

Parameters
string$name
Returns
bool
setCache (   $name,
Zend_Cache_Core  $cache 
)

Set a new cache for the Cache Manager to contain.

Parameters
string$name
Zend_Cache_Core$cache
Returns
Zend_Cache_Manager
setCacheTemplate (   $name,
  $options 
)

Set a named configuration template from which a cache object can later be lazy loaded.

Parameters
string$name
array$options
Returns
Zend_Cache_Manager
Exceptions
Zend_Cache_Exception
setTemplateOptions (   $name,
  $options 
)

Pass an array containing changes to be applied to a named configuration template.

Parameters
string$name
array$options
Returns
Zend_Cache_Manager
Exceptions
Zend_Cache_Exceptionfor invalid options format or if option templates do not have $name

Member Data Documentation

$_caches = array()
protected
$_optionTemplates
protected
const PAGECACHE = 'page'

Constant holding reserved name for default Page Cache.

const PAGETAGCACHE = 'pagetag'

Constant holding reserved name for default Page Tag Cache.