| API | Package | Class | phpDocumentor | Last reviewed | Doc status |
|---|---|---|---|---|---|
Joomla.Framework | JFactory | JFactory->getCache |
This method creates a JCache child class object. When the method is called, an object of the appropriate child class is instantianted and returned. See the Cache package for more information.
object &getCache ( $group, $handler )
| $group | string | is a string containing the cache group name. This parameter is optional and if omitted defaults to an empty string. |
| $handler | string | is a string containing the cache class name. This parameter is optional and if omitted default to ‘function’. |
The following code is from the com_admin component (admin.admin.php):
Example
$cache = & JFactory::getCache(); $cache->cleanCache( 'com_content' );