Actions

API15

JCache/store

From Joomla! Documentation

< API15:JCache
Revision as of 17:11, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Store the cached data by id and group

[Edit Descripton]

Description:JCache/store

Syntax

store($data, $id, $group=null)
Parameter Name Default Value Description
$data $id The cache data id
$id $group The cache data group
$group null $data The data to store

Returns

boolean True if cache stored

Defined in

libraries/joomla/cache/cache.php

Importing

jimport( 'joomla.cache.cache' );

Source Body

function store($data, $id, $group=null)
{
        // Get the default group
        $group = ($group) ? $group : $this->_options['defaultgroup'];
 
        // Get the storage handler and store the cached data
        $handler =& $this->_getStorage();
        if (!JError::isError($handler) && $this->_options['caching']) {
                return $handler->store($id, $group, $data);
        }
        return false;
}

[Edit See Also] SeeAlso:JCache/store

Examples

<CodeExamplesForm />