Cache/Frontend/Function.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 license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cache
- Subpackage
- Zend_Cache_Frontend
- Version
- $Id$
\Zend_Cache_Frontend_Function
Package: Zend_Cache\Zend_Cache_Frontend
- Parent(s)
- \Zend_Cache_Core
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
array $_specificOptions = array('cache_by_default' => true, 'cached_functions' => array(), 'non_cached_functions' => array())
This frontend specific options
====> (boolean) cache_by_default :
- if true, function calls will be cached by default
====> (array) cached_functions :
- an array of function names which will be cached (even if cache_by_default = false)
====> (array) non_cached_functions :
- an array of function names which won't be cached (even if cache_by_default = true)
Default valuearray('cache_by_default' => true, 'cached_functions' => array(), 'non_cached_functions' => array())
Details- Type
- array
Methods
__construct(array $options = array()) : void
Constructor
Parameters
Name | Type | Description |
---|---|---|
$options | array | Associative array of options |
_makeId( $callback, $args) : void
ZF-9970
Parameters
Details
Name | Type | Description |
---|---|---|
$callback | ||
$args |
- Deprecated
call(callback $callback, array $parameters = array(), array $tags = array(), int $specificLifetime = false, int $priority = 8) : mixed
Main method : call the specified function or get the result from cache
Parameters
Returns
Name | Type | Description |
---|---|---|
$callback | callback | A valid callback |
$parameters | array | Function parameters |
$tags | array | Cache tags |
$specificLifetime | int | If != false, set a specific lifetime for this cache record (null => infinite lifetime) |
$priority | int | integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends |
Type | Description |
---|---|
mixed | Result |
makeId(callback $callback, array $args = array()) : string
Make a cache id from the function name and parameters
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$callback | callback | A valid callback |
$args | array | Function parameters |
Type | Description |
---|---|
string | Cache id |
Exception | Description |
---|---|
\Zend_Cache_Exception |