Cache.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: Cache.php 24656 2012-02-26 06:02:53Z adamlundrigan $
\Zend_Cache
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


array $availableBackends = array('File', 'Sqlite', 'Memcached', 'Libmemcached', 'Apc', 'ZendPlatform', 'Xcache', 'WinCache', 'TwoLevels')
Only for backward compatibility (may be removed in next major release)
array('File', 'Sqlite', 'Memcached', 'Libmemcached', 'Apc', 'ZendPlatform', 'Xcache', 'WinCache', 'TwoLevels')
Details- Type
- array
- Deprecated


array $availableFrontends = array('Core', 'Output', 'Class', 'File', 'Function', 'Page')
Only for backward compatibility (may be removed in next major release)
array('Core', 'Output', 'Class', 'File', 'Function', 'Page')
Details- Type
- array
- Deprecated


array $standardBackends = array('File', 'Sqlite', 'Memcached', 'Libmemcached', 'Apc', 'ZendPlatform', 'Xcache', 'TwoLevels', 'WinCache', 'ZendServer_Disk', 'ZendServer_ShMem')
Standard backends
array('File', 'Sqlite', 'Memcached', 'Libmemcached', 'Apc', 'ZendPlatform', 'Xcache', 'TwoLevels', 'WinCache', 'ZendServer_Disk', 'ZendServer_ShMem')
Details- Type
- array


array $standardExtendedBackends = array('File', 'Apc', 'TwoLevels', 'Memcached', 'Libmemcached', 'Sqlite', 'WinCache')
Standard backends which implement the ExtendedInterface
array('File', 'Apc', 'TwoLevels', 'Memcached', 'Libmemcached', 'Sqlite', 'WinCache')
Details- Type
- array
Methods


_isReadable(string $filename) : boolean
Returns TRUE if the $filename is readable, or FALSE otherwise.
This function uses the PHP include_path, where PHP's is_readable() does not.
Note : this method comes from Zend_Loader (see #ZF-2891 for details)
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
boolean |


_makeBackend(string $backend, array $backendOptions, boolean $customBackendNaming = false, boolean $autoload = false) : \Zend_Cache_Backend
Backend Constructor
Name | Type | Description |
---|---|---|
$backend | string | |
$backendOptions | array | |
$customBackendNaming | boolean | |
$autoload | boolean |
Type | Description |
---|---|
\Zend_Cache_Backend |


_makeFrontend(string $frontend, array $frontendOptions = array(), boolean $customFrontendNaming = false, boolean $autoload = false) : \Zend_Cache_Core | \Zend_Cache_Frontend
Frontend Constructor
Name | Type | Description |
---|---|---|
$frontend | string | |
$frontendOptions | array | |
$customFrontendNaming | boolean | |
$autoload | boolean |
Type | Description |
---|---|
\Zend_Cache_Core | \Zend_Cache_Frontend |


_normalizeName(string $name) : string
Normalize frontend and backend names to allow multiple words TitleCased
Name | Type | Description |
---|---|---|
$name | string | Name to normalize |
Type | Description |
---|---|
string |


factory(mixed $frontend, mixed $backend, array $frontendOptions = array(), array $backendOptions = array(), boolean $customFrontendNaming = false, boolean $customBackendNaming = false, boolean $autoload = false) : \Zend_Cache_Core | \Zend_Cache_Frontend
Factory
Name | Type | Description |
---|---|---|
$frontend | mixed | frontend name (string) or Zend_Cache_Frontend_ object |
$backend | mixed | backend name (string) or Zend_Cache_Backend_ object |
$frontendOptions | array | associative array of options for the corresponding frontend constructor |
$backendOptions | array | associative array of options for the corresponding backend constructor |
$customFrontendNaming | boolean | if true, the frontend argument is used as a complete class name ; if false, the frontend argument is used as the end of "Zend_Cache_Frontend_[...]" class name |
$customBackendNaming | boolean | if true, the backend argument is used as a complete class name ; if false, the backend argument is used as the end of "Zend_Cache_Backend_[...]" class name |
$autoload | boolean | if true, there will no require_once for backend and frontend (useful only for custom backends/frontends) |
Type | Description |
---|---|
\Zend_Cache_Core | \Zend_Cache_Frontend |
Exception | Description |
---|---|
\Zend_Cache_Exception |


throwException(string $msg, $e = null) : void
Throw an exception
Note : for perf reasons, the "load" of Zend/Cache/Exception is dynamic
Name | Type | Description |
---|---|---|
$msg | string | Message for the exception |
$e |
Exception | Description |
---|---|
\Zend_Cache_Exception |