Cache/Frontend/Class.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_Class

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

>VPropertyprotectedmixed $_cachedEntity = null
The cached object or the name of the cached abstract class
Default valuenullDetails
Type
mixed
>VPropertyprotectedstring $_cachedEntityLabel = ''
The class name of the cached object or cached abstract class
Used to differentiate between different classes with the same method calls.
Default value''Details
Type
string
>VPropertyprotectedint $_priority = 8
Priority (used by some particular backends)
Default value8Details
Type
int
>VPropertyprotectedbool|int $_specificLifetime = false
SpecificLifetime value
false => no specific life time
Default valuefalseDetails
Type
bool | int
>VPropertyprotectedarray $_specificOptions = array('cached_entity' => null, 'cache_by_default' => true, 'cached_methods' => array(), 'non_cached_methods' => array())
Available options
====> (mixed) cached_entity : - if set to a class name, we will cache an abstract class and will use only static calls - if set to an object, we will cache this object methods ====> (boolean) cache_by_default : - if true, method calls will be cached by default ====> (array) cached_methods : - an array of method names which will be cached (even if cache_by_default = false) ====> (array) non_cached_methods : - an array of method names which won't be cached (even if cache_by_default = true)
Default valuearray('cached_entity' => null, 'cache_by_default' => true, 'cached_methods' => array(), 'non_cached_methods' => array())Details
Type
array
>VPropertyprotectedarray $_tags = array()
Tags array
Default valuearray()Details
Type
array

Methods

methodpublic__call(string $name, array $parameters) : mixed

Main method : call the specified method or get the result from cache

Parameters
NameTypeDescription
$namestring

Method name

$parametersarray

Method parameters

Returns
TypeDescription
mixedResult
Throws
ExceptionDescription
\Exception
methodpublic__construct(array $options = array()) : void

Constructor

Parameters
NameTypeDescription
$optionsarray

Associative array of options

Throws
ExceptionDescription
\Zend_Cache_Exception
methodprivate_makeId( $name,  $args) : void

ZF-9970

Parameters
NameTypeDescription
$name
$args
Details
Deprecated
 
methodpublicmakeId(string $name, array $args = array()) : string

Make a cache id from the method name and parameters

Parameters
NameTypeDescription
$namestring

Method name

$argsarray

Method parameters

Returns
TypeDescription
stringCache id
methodpublicsetCachedEntity(mixed $cachedEntity) : void

Specific method to set the cachedEntity

if set to a class name, we will cache an abstract class and will use only static calls if set to an object, we will cache this object methods
Parameters
NameTypeDescription
$cachedEntitymixed
methodpublicsetOption(string $name, mixed $value) : void

Public frontend to set an option

Just a wrapper to get a specific behaviour for cached_entity
Parameters
NameTypeDescription
$namestring

Name of the option

$valuemixed

Value of the option

Throws
ExceptionDescription
\Zend_Cache_Exception
methodpublicsetPriority(int $priority) : void

Set the priority (used by some particular backends)

Parameters
NameTypeDescription
$priorityint

integer between 0 (very low priority) and 10 (maximum priority)

methodpublicsetSpecificLifetime(bool | int $specificLifetime = false) : void

Set a specific life time

Parameters
NameTypeDescription
$specificLifetimebool | int
methodpublicsetTagsArray(array $tags = array()) : void

Set the cache array

Parameters
NameTypeDescription
$tagsarray
Documentation was generated by phpDocumentor 2.2.0 .