Cache/Frontend/Function.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VPropertyprotectedarray $_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

methodpublic__construct(array $options = array()) : void

Constructor

Parameters
NameTypeDescription
$optionsarray

Associative array of options

methodprivate_makeId( $callback,  $args) : void

ZF-9970

Parameters
NameTypeDescription
$callback
$args
Details
Deprecated
 
methodpubliccall(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
NameTypeDescription
$callbackcallback

A valid callback

$parametersarray

Function parameters

$tagsarray

Cache tags

$specificLifetimeint

If != false, set a specific lifetime for this cache record (null => infinite lifetime)

$priorityint

integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends

Returns
TypeDescription
mixedResult
methodpublicmakeId(callback $callback, array $args = array()) : string

Make a cache id from the function name and parameters

Parameters
NameTypeDescription
$callbackcallback

A valid callback

$argsarray

Function parameters

Returns
TypeDescription
stringCache id
Throws
ExceptionDescription
\Zend_Cache_Exception
Documentation was generated by phpDocumentor 2.2.0 .