API16

JCachePage/store

From Joomla! Documentation

< API16:JCachePage
Revision as of 17:38, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Stop the cache buffer and store the cached data <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

Description[edit]

Stop the cache buffer and store the cached data

[Edit Descripton]

Template:Description:JCachePage/store

Syntax[edit]

store()


Returns[edit]

boolean True if cache stored

Defined in[edit]

libraries/joomla/cache/handler/page.php

Importing[edit]

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

Source Body[edit]

function store()
{
        // Get page data from JResponse body
        $data = JResponse::getBody();

        // Get id and group and reset them placeholders
        $id             = $this->id;
        $group  = $this->group;
        $this->id               = null;
        $this->group    = null;

        // Only attempt to store if page data exists
        if ($data) {
                return parent::store($data, $id, $group);
        }
        return false;
}

[Edit See Also] Template:SeeAlso:JCachePage/store

Examples[edit]

<CodeExamplesForm />