Difference between revisions of "JCache"
From Joomla! Documentation
m (moving preparation) |
m (preparing for archive only) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JCache== | =={{JVer|11.1}} JCache== | ||
===Description=== | ===Description=== | ||
− | + | JCache is an abstract class which defines Joomla's basic caching functionality. The class needs to be extended by a concrete cache handler. The Joomla Framework currently provides the handlers JCacheView, JCachePage, JCacheCallback and JCacheOutput | |
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 98: | Line 96: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage Cache|Cache]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage Cache|Cache]] | ||
* [[API17:JCache|Other versions of JCache]] | * [[API17:JCache|Other versions of JCache]] | ||
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JCache | category=JCache | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* |
Latest revision as of 21:24, 24 March 2017
The "API17" 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.
JCache[edit]
Description[edit]
JCache is an abstract class which defines Joomla's basic caching functionality. The class needs to be extended by a concrete cache handler. The Joomla Framework currently provides the handlers JCacheView, JCachePage, JCacheCallback and JCacheOutput
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __construct | Constructor. |
public | _getStorage | Get the cache storage handler. |
public | clean | Clean cache for a group given a mode. |
public | gc | Garbage collect expired cache data. |
public | get | Get cached data by id and group. |
public | getAll | Get a list of all cached data. |
public | getCaching | Get caching state. |
public | lock | Set lock flag on cached item. |
public | remove | Remove a cached data entry by id and group. |
public | setCaching | Set caching enabled state. |
public | setLifeTime | Set cache lifetime. |
public | store | Store the cached data by id and group. |
public | unlock | Unset lock flag on cached item. |
public static | addIncludePath | Add a directory where should search for handlers. |
public static | getInstance | Returns a reference to a cache adapter object, always creating it. |
public static | getStores | Get the storage handlers. |
public static | getWorkarounds | Perform workarounds on retrieved cached data. |
public static | makeId | Create safe id for cached data from url parameters set by plugins and framework. |
public static | setWorkarounds | Create workarounded data to be cached. |
- Defined in libraries/joomla/cache/cache.php
- Extends JObject
Importing[edit]
jimport( 'joomla.cache.cache' );
See also[edit]
- JCache source code on BitBucket
- Subpackage Cache
- Other versions of JCache
User contributed notes[edit]
Code Examples[edit]