| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Cache |
JCache |
getInstance |
getInstance() |
Never | Work in Progress |
Returns a reference to the global cache object, only creating it if it doesn’t already exist.
JCache &getInstance ( $handler, $options )
| $handler | string | is a string containing the cache handler to instantiate. The currently available handlers are: Function, Hash, Output and Page. This parameter is optional and if omitted defaults to ‘Function’. |
| $options | array | is an associative array of cache options. See __construct for more information. |
This function is called by the JFactory::getCache method using the following code:
Example
$cache =& JCache::getInstance( $handler, $options );