Source for file page.php
Documentation is available at page.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Joomla! Cache page type object
* @package Joomla.Platform
* @var integer ID property for the cache page object.
* @var string Cache group
* @var object Cache lock test
* Get the cached page data
* @param string $id The cache data id
* @param string $group The cache data group
* @return boolean True if the cache is hit (false else)
public function get($id =
false, $group =
'page')
// If an id is not given, generate it from the request
// If the etag matches the page id ... set a no change header and exit : utilize browser cache
if (!headers_sent() && isset
($_SERVER['HTTP_IF_NONE_MATCH']))
$browserCache = isset
($this->options['browsercache']) ?
$this->options['browsercache'] :
false;
// We got a cache hit... set the etag header and echo the page data
$data =
$this->cache->get($id, $group);
$data =
$this->cache->get($id, $group);
$this->cache->unlock($id, $group);
// Set id and group placeholders
* Stop the cache buffer and store the cached data
* @param mixed $data The data to store
* @param string $id The cache data id
* @param string $group The cache data group
* @param boolean $wrkarounds True to use wrkarounds
* @return boolean True if cache stored
public function store($data, $id, $group =
null, $wrkarounds =
true)
// Get page data from the application object
// Get id and group and reset the placeholders
// Only attempt to store if page data exists
$this->cache->unlock($id, $group);
* Generate a page cache id
* @return string MD5 Hash : page cache id
* @todo Discuss whether this should be coupled to a data hash or a request
* hash ... perhaps hashed with a serialized request
* There is no change in page data so send an
* unmodified header and die gracefully
// Send not modified header and exit gracefully
header('HTTP/1.x 304 Not Modified', true);
* Set the ETag header in the response
* @param string $etag The entity tag (etag) to set
Documentation generated on Tue, 19 Nov 2013 15:10:03 +0100 by phpDocumentor 1.4.3