Class Zend_Cache_Frontend_Page

Description
  • copyright: Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Cache/Frontend/Page.php (line 35)

Zend_Cache_Core
   |
   --Zend_Cache_Frontend_Page
Variable Summary
Method Summary
 void __construct ([ $options = array()], boolean $doNotTestCacheValidity)
 void cancel ()
 boolean start ([string $id = false], [boolean $doNotDie = false])
 string _flush (string $data)
 mixed|false _makeId ()
 mixed|false _makePartialId (string $arrayName, bool $bool1, bool $bool2)
 void _setContentTypeMemorization (boolean $value)
 void _setDefaultOptions (array $options)
 void _setRegexps ( $regexps, array $options)
Variables
array $_activeOptions = array() (line 112)

Internal array to store some options

  • var: associative array of options
  • access: protected
array $_specificOptions = array(
'http_conditional' => false,
'debug_header' => false,
'content_type_memorization' => false,
'memorize_headers' => array(),'default_options'=>array('cache_with_get_variables'=>false,'cache_with_post_variables'=>false,'cache_with_session_variables'=>false,'cache_with_files_variables'=>false,'cache_with_cookie_variables'=>false,'make_id_with_get_variables'=>true,'make_id_with_post_variables'=>true,'make_id_with_session_variables'=>true,'make_id_with_files_variables'=>true,'make_id_with_cookie_variables'=>true,'cache'=>true,'specific_lifetime'=>false,'tags'=>array(),'priority'=>null),'regexps'=>array())
(line 83)

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 :
    • (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

    • var: options
    • access: protected

    Redefinition of:
    Zend_Cache_Core::$_specificOptions
    Not used for the core, just a sort a hint to get a common setOption() method (for the core and for frontends)

    Inherited Variables

    Inherited from Zend_Cache_Core

    Zend_Cache_Core::$_backend
    Zend_Cache_Core::$_backendCapabilities
    Zend_Cache_Core::$_directivesList
    Zend_Cache_Core::$_extendedBackend
    Zend_Cache_Core::$_options
    Methods
    Constructor __construct (line 129)

    Constructor

    • throws: Zend_Cache_Exception
    • access: public
    void __construct ([ $options = array()], boolean $doNotTestCacheValidity)
    • array $options: Associative array of options
    • boolean $doNotTestCacheValidity: If set to true, the cache validity won't be tested

    Redefinition of:
    Zend_Cache_Core::__construct()
    Constructor
    cancel (line 294)

    Cancel the current caching process

    • access: public
    void cancel ()
    start (line 241)

    Start the cache

    • return: True if the cache is hit (false else)
    • access: public
    boolean start ([string $id = false], [boolean $doNotDie = false])
    • string $id: (optional) A cache id (if you set a value here, maybe you have to use Output frontend instead)
    • boolean $doNotDie: For unit testing only !
    _flush (line 306)

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

    • return: Data to send to browser
    • access: public
    string _flush (string $data)
    • string $data: Buffered output
    _makeId (line 337)

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

    • return: a cache id (string), false if the cache should have not to be used
    • access: protected
    mixed|false _makeId ()
    _makePartialId (line 358)

    Make a partial id depending on options

    • return: Partial id (string) or false if the cache should have not to be used
    • access: protected
    mixed|false _makePartialId (string $arrayName, bool $bool1, bool $bool2)
    • string $arrayName: Superglobal array name
    • bool $bool1: If true, cache is still on even if there are some variables in the superglobal array
    • bool $bool2: If true, we have to use the content of the superglobal array to make a partial id
    _setContentTypeMemorization (line 185)

    Set the deprecated contentTypeMemorization option

    • deprecated:
    • access: protected
    void _setContentTypeMemorization (boolean $value)
    • boolean $value: value
    _setDefaultOptions (line 162)

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

    • throws: Zend_Cache_Exception
    • access: protected
    void _setDefaultOptions (array $options)
    • array $options: Associative array
    _setRegexps (line 211)

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

    • throws: Zend_Cache_Exception
    • access: protected
    void _setRegexps ( $regexps, array $options)
    • array $options: Associative array
    • $regexps

    Inherited Methods

    Inherited From Zend_Cache_Core

     Zend_Cache_Core::__construct()
     Zend_Cache_Core::clean()
     Zend_Cache_Core::getBackend()
     Zend_Cache_Core::getFillingPercentage()
     Zend_Cache_Core::getIds()
     Zend_Cache_Core::getIdsMatchingTags()
     Zend_Cache_Core::getIdsNotMatchingTags()
     Zend_Cache_Core::getOption()
     Zend_Cache_Core::getTags()
     Zend_Cache_Core::load()
     Zend_Cache_Core::remove()
     Zend_Cache_Core::save()
     Zend_Cache_Core::setBackend()
     Zend_Cache_Core::setLifetime()
     Zend_Cache_Core::setOption()
     Zend_Cache_Core::test()
     Zend_Cache_Core::touch()
     Zend_Cache_Core::_log()
     Zend_Cache_Core::_loggerSanity()

    Documentation generated on Fri, 08 Jan 2010 17:26:59 -0500 by phpDocumentor 1.4.3