Cache/Backend.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
- Subpackage
- Zend_Cache_Backend
- Version
- $Id: Backend.php 24989 2012-06-21 07:24:13Z mabe $
\Zend_Cache_Backend
- Children
- \Zend_Cache_Backend_BlackHole
- \Zend_Cache_Backend_WinCache
- \Zend_Cache_Backend_Memcached
- \Zend_Cache_Backend_ZendServer
- \Zend_Cache_Backend_ZendPlatform
- \Zend_Cache_Backend_Static
- \Zend_Cache_Backend_File
- \Zend_Cache_Backend_Test
- \Zend_Cache_Backend_Libmemcached
- \Zend_Cache_Backend_TwoLevels
- \Zend_Cache_Backend_Xcache
- \Zend_Cache_Backend_Apc
- \Zend_Cache_Backend_Sqlite
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_directives = array('lifetime' => 3600, 'logging' => false, 'logger' => null)Frontend or Core directives
<p>directives</p>=====> (int) lifetime : - Cache lifetime (in seconds) - If null, the cache is valid forever
=====> (int) logging : - if set to true, a logging is activated throw Zend_Log
array('lifetime' => 3600, 'logging' => false, 'logger' => null)Details- Type
- array
Methods

__construct(array $options = array()) : voidConstructor
| Name | Type | Description |
|---|---|---|
| $options | array | Associative array of options |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |

_isGoodTmpDir(string $dir) : booleanVerify if the given temporary directory is readable and writable
| Name | Type | Description |
|---|---|---|
| $dir | string | temporary directory |
| Type | Description |
|---|---|
| boolean | true if the directory is ok |

_log(string $message, $priority = 4) : voidLog a message at the WARN (4) priority.
| Name | Type | Description |
|---|---|---|
| $message | string | |
| $priority |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |

_loggerSanity() : voidMake sure if we enable logging that the Zend_Log class is available.
Create a default log object if none is set.
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |

getLifetime(int $specificLifetime) : intGet the life time
if $specificLifetime is not false, the given specific life time is used else, the global lifetime is used
| Name | Type | Description |
|---|---|---|
| $specificLifetime | int |
| Type | Description |
|---|---|
| int | Cache life time |

getOption(string $name) : mixedReturns an option
| Name | Type | Description |
|---|---|---|
| $name | string | Optional, the options name to return |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Cache_Exceptions |

getTmpDir() : stringDetermine system TMP directory and detect if we have read access
inspired from Zend_File_Transfer_Adapter_Abstract
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception | if unable to determine directory |

isAutomaticCleaningAvailable() : booleanReturn true if the automatic cleaning is available for the backend
DEPRECATED : use getCapabilities() instead
| Type | Description |
|---|---|
| boolean |
- Deprecated

setDirectives(array $directives) : voidSet the frontend directives
| Name | Type | Description |
|---|---|---|
| $directives | array | Assoc of directives |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |

setOption(string $name, mixed $value) : voidSet an option
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Exception | Description |
|---|---|
| \Zend_Cache_Exception |