API Documentation

Cache/Frontend/Page.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Cache
subpackage
Zend_Cache_Frontend
version
$Id: Page.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Cache_Frontend_Page

Description

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.

Zend_Cache_Frontend_Page

Extends from
Zend_Cache_Core
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Cache
subpackage
Zend_Cache_Frontend
Properties
$_specificOptions
$_activeOptions
$_cancel
Methods
__construct
_setDefaultOptions
_setContentTypeMemorization
_setRegexps
start
cancel
_flush
_makeId
_makePartialId

Description

Properties

$_activeOptions

array $_activeOptions = 'array'

Internal array to store some options

Details

$_activeOptions
array
associative array of options
visibility
protected
default
array
final
false
static
false

$_cancel

boolean $_cancel = 'false'

If true, the page won't be cached

Details

$_cancel
boolean
visibility
protected
default
false
final
false
static
false

$_specificOptions

array $_specificOptions = 'array'

This frontend specific options

====> (boolean) http_conditional : - if true, http conditional mode is on WARNING : http_conditional OPTION IS NOT IMPLEMENTED FOR THE MOMENT (TODO)

====> (boolean) debug_header : - if true, a debug text is added before each cached pages

====> (boolean) content_type_memorization : - deprecated => use memorize_headers instead - if the Content-Type header is sent after the cache was started, the corresponding value can be memorized and replayed when the cache is hit (if false (default), the frontend doesn't take care of Content-Type header)

====> (array) memorize_headers : - an array of strings corresponding to some HTTP headers name. Listed headers will be stored with cache datas and "replayed" when the cache is hit

====> (array) default_options : - an associative array of default options : - (boolean) cache : cache is on by default if true - (boolean) cacheWithXXXVariables (XXXX = 'Get', 'Post', 'Session', 'Files' or 'Cookie') : if true, cache is still on even if there are some variables in this superglobal array if false, cache is off if there are some variables in this superglobal array - (boolean) makeIdWithXXXVariables (XXXX = 'Get', 'Post', 'Session', 'Files' or 'Cookie') : if true, we have to use the content of this superglobal array to make a cache id if false, the cache id won't be dependent of the content of this superglobal array - (int) specific_lifetime : cache specific lifetime (false => global lifetime is used, null => infinite lifetime, integer => this lifetime is used), this "lifetime" is probably only usefull when used with "regexps" array - (array) tags : array of tags (strings) - (int) priority : integer between 0 (very low priority) and 10 (maximum priority) used by some particular backends

====> (array) regexps : - an associative array to set options only for some REQUEST_URI - keys are (pcre) regexps - values are associative array with specific options to set if the regexp matchs on $_SERVER['REQUEST_URI'] (see default_options for the list of available options) - if several regexps match the $_SERVER['REQUEST_URI'], only the last one will be used

Details

$_specificOptions
array
options
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( array $options = array ) : void

Constructor

Arguments
$options
array
Associative array of options
Details
visibility
public
final
false
static
false
throws

_flush

_flush( string $data ) : string

callback for output buffering (shouldn't really be called manually)

Arguments
$data
string
Buffered output
Output
string
Data to send to browser
Details
visibility
public
final
false
static
false

_makeId

_makeId( ) : mixed|false

Make an id depending on REQUEST_URI and superglobal arrays (depending on options)

Output
mixed|false
a cache id (string), false if the cache should have not to be used
Details
visibility
protected
final
false
static
false

_makePartialId

_makePartialId( string $arrayName, bool $bool1, bool $bool2 ) : mixed|false

Make a partial id depending on options

Arguments
$arrayName
string
Superglobal array name
$bool1
bool
If true, cache is still on even if there are some variables in the superglobal array
$bool2
bool
If true, we have to use the content of the superglobal array to make a partial id
Output
mixed|false
Partial id (string) or false if the cache should have not to be used
Details
visibility
protected
final
false
static
false

_setContentTypeMemorization

_setContentTypeMemorization( boolean $value ) : void

Set the deprecated contentTypeMemorization option

Arguments
$value
boolean
value
Details
visibility
protected
final
false
static
false
deprecated

_setDefaultOptions

_setDefaultOptions( array $options ) : void

Specific setter for the 'default_options' option (with some additional tests)

Arguments
$options
array
Associative array
Details
visibility
protected
final
false
static
false
throws

_setRegexps

_setRegexps(  $regexps ) : void

Specific setter for the 'regexps' option (with some additional tests)

Arguments
$regexps
Details
visibility
protected
final
false
static
false
throws

cancel

cancel( ) :

Cancel the current caching process

Details
visibility
public
final
false
static
false

start

start( string $id = false, boolean $doNotDie = false ) : boolean

Start the cache

Arguments
$id
string
(optional) A cache id (if you set a value here, maybe you have to use Output frontend instead)
$doNotDie
boolean
For unit testing only !
Output
boolean
True if the cache is hit (false else)
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.