Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Cache_Frontend_Page Class Reference

Public Member Functions

 __construct (array $options=array())
 Constructor.
 
 start ($id=false, $doNotDie=false)
 Start the cache.
 
 cancel ()
 Cancel the current caching process.
 
 _flush ($data)
 callback for output buffering (shouldn't really be called manually)
 
- Public Member Functions inherited from Zend_Cache_Core
 __construct ($options=array())
 Constructor.
 
 setConfig (Zend_Config $config)
 Set options using an instance of type Zend_Config.
 
 setBackend (Zend_Cache_Backend $backendObject)
 Set the backend.
 
 getBackend ()
 Returns the backend.
 
 setOption ($name, $value)
 Public frontend to set an option.
 
 getOption ($name)
 Public frontend to get an option value.
 
 setLifetime ($newLifetime)
 Force a new lifetime.
 
 load ($id, $doNotTestCacheValidity=false, $doNotUnserialize=false)
 Test if a cache is available for the given id and (if yes) return it (false else)
 
 test ($id)
 Test if a cache is available for the given id.
 
 save ($data, $id=null, $tags=array(), $specificLifetime=false, $priority=8)
 Save some data in a cache.
 
 remove ($id)
 Remove a cache.
 
 clean ($mode= 'all', $tags=array())
 Clean cache entries.
 
 getIdsMatchingTags ($tags=array())
 Return an array of stored cache ids which match given tags.
 
 getIdsNotMatchingTags ($tags=array())
 Return an array of stored cache ids which don't match given tags.
 
 getIdsMatchingAnyTags ($tags=array())
 Return an array of stored cache ids which match any given tags.
 
 getIds ()
 Return an array of stored cache ids.
 
 getTags ()
 Return an array of stored tags.
 
 getFillingPercentage ()
 Return the filling percentage of the backend storage.
 
 getMetadatas ($id)
 Return an array of metadatas for the given cache id.
 
 touch ($id, $extraLifetime)
 Give (if possible) an extra lifetime to the given cache id.
 

Protected Member Functions

 _setDefaultOptions ($options)
 Specific setter for the 'default_options' option (with some additional tests)
 
 _setContentTypeMemorization ($value)
 Set the deprecated contentTypeMemorization option.
 
 _setRegexps ($regexps)
 Specific setter for the 'regexps' option (with some additional tests)
 
 _makeId ()
 Make an id depending on REQUEST_URI and superglobal arrays (depending on options)
 
 _makePartialId ($arrayName, $bool1, $bool2)
 Make a partial id depending on options.
 
- Protected Member Functions inherited from Zend_Cache_Core
 _loggerSanity ()
 Make sure if we enable logging that the Zend_Log class is available.
 
 _log ($message, $priority=4)
 Log a message at the WARN (4) priority.
 
 _id ($id)
 Make and return a cache id.
 

Protected Attributes

 $_specificOptions
 
 $_activeOptions = array()
 
 $_cancel = false
 
- Protected Attributes inherited from Zend_Cache_Core
 $_backend = null
 Backend Object.
 
 $_options
 
 $_specificOptions = array()
 Not used for the core, just a sort a hint to get a common setOption() method (for the core and for frontends)
 
 $_extendedBackend = false
 True if the backend implements Zend_Cache_Backend_ExtendedInterface.
 
 $_backendCapabilities = array()
 

Additional Inherited Members

- Public Attributes inherited from Zend_Cache_Core
const BACKEND_NOT_SUPPORTS_TAG = 'tags are not supported by the current backend'
 Messages.
 
const BACKEND_NOT_IMPLEMENTS_EXTENDED_IF = 'Current backend doesn\'t implement the Zend_Cache_Backend_ExtendedInterface, so this method is not available'
 
- Static Protected Member Functions inherited from Zend_Cache_Core
static _validateIdOrTag ($string)
 Validate a cache id or a tag (security, reliable filenames, reserved prefixes...)
 
static _validateTagsArray ($tags)
 Validate a tags array (security, reliable filenames, reserved prefixes...)
 
- Static Protected Attributes inherited from Zend_Cache_Core
static $_directivesList = array('lifetime', 'logging', 'logger')
 Array of options which have to be transfered to backend.
 

Constructor & Destructor Documentation

__construct ( array  $options = array())

Constructor.

Parameters
array$optionsAssociative array of options
boolean$doNotTestCacheValidityIf set to true, the cache validity won't be tested
Exceptions
Zend_Cache_Exception
Returns
void

Member Function Documentation

_flush (   $data)

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

Parameters
string$dataBuffered output
Returns
string Data to send to browser
_makeId ( )
protected

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

Returns
mixed|false a cache id (string), false if the cache should have not to be used
_makePartialId (   $arrayName,
  $bool1,
  $bool2 
)
protected

Make a partial id depending on options.

Parameters
string$arrayNameSuperglobal array name
bool$bool1If true, cache is still on even if there are some variables in the superglobal array
bool$bool2If true, we have to use the content of the superglobal array to make a partial id
Returns
mixed|false Partial id (string) or false if the cache should have not to be used
_setContentTypeMemorization (   $value)
protected

Set the deprecated contentTypeMemorization option.

Parameters
boolean$valuevalue
Returns
void
Deprecated:
_setDefaultOptions (   $options)
protected

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

Parameters
array$optionsAssociative array
Exceptions
Zend_Cache_Exception
Returns
void
_setRegexps (   $regexps)
protected

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

Parameters
array$optionsAssociative array
Exceptions
Zend_Cache_Exception
Returns
void
cancel ( )

Cancel the current caching process.

start (   $id = false,
  $doNotDie = false 
)

Start the cache.

Parameters
string$id(optional) A cache id (if you set a value here, maybe you have to use Output frontend instead)
boolean$doNotDieFor unit testing only !
Returns
boolean True if the cache is hit (false else)

Member Data Documentation

$_activeOptions = array()
protected
$_cancel = false
protected
$_specificOptions
protected
Initial value:
= 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()
)