From Joomla! Documentation

< API16:JCachePage

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.


Get the cached page data

<! removed transcluded page call, red link never existed >


get($id=false, $group='page')
Parameter Name Default Value Description
$id false $id The cache data id
$group 'page' $group The cache data group


boolean True if the cache is hit (false else)

Defined in



jimport( 'joomla.cache.handler.page' );

Source Body

function get($id=false, $group='page')
        // Initialise variables.
        $data = false;

        // If an id is not given generate it from the request
        if ($id == false) {
                $id = $this->_makeId();

        // If the etag matches the page id ... sent a no change header and exit : utilize browser cache
        if (!headers_sent() && isset($_SERVER['HTTP_IF_NONE_MATCH'])){
                $etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
                if ($etag == $id) {
                        $browserCache = isset($this->_options['browsercache']) ? $this->_options['browsercache'] : false;
                        if ($browserCache) {

        // We got a cache hit... set the etag header and echo the page data
        $data = parent::get($id, $group);
        if ($data !== false) {
                return $data;

        // Set id and group placeholders
        $this->id               = $id;
        $this->group    = $group;
        return false;

<! removed transcluded page call, red link never existed >


Code Examples