API16:JCache/store
From Joomla! Documentation
Description
Store the cached data by id and group
<! removed transcluded page call, red link never existed >
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;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples