API17

Difference between revisions of "JCache"

From Joomla! Documentation

m (→‎User contributed notes: bad link repair)
m (preparing for archive only)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
=={{JVer|11.1}} JCache==
 
=={{JVer|11.1}} JCache==
 
===Description===
 
===Description===
{{Description:JCache}}
+
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
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[Description:JCache|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 14: Line 12:
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::__construct/11.1|__construct]]
+
|[[API17:JCache::__construct|__construct]]
 
|Constructor.  
 
|Constructor.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::_getStorage/11.1|_getStorage]]
+
|[[API17:JCache::_getStorage|_getStorage]]
 
|Get the cache storage handler.  
 
|Get the cache storage handler.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::clean/11.1|clean]]
+
|[[API17:JCache::clean|clean]]
 
|Clean cache for a group given a mode.  
 
|Clean cache for a group given a mode.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::gc/11.1|gc]]
+
|[[API17:JCache::gc|gc]]
 
|Garbage collect expired cache data.  
 
|Garbage collect expired cache data.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::get/11.1|get]]
+
|[[API17:JCache::get|get]]
 
|Get cached data by id and group.  
 
|Get cached data by id and group.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::getAll/11.1|getAll]]
+
|[[API17:JCache::getAll|getAll]]
 
|Get a list of all cached data.  
 
|Get a list of all cached data.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::getCaching/11.1|getCaching]]
+
|[[API17:JCache::getCaching|getCaching]]
 
|Get caching state.  
 
|Get caching state.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::lock/11.1|lock]]
+
|[[API17:JCache::lock|lock]]
 
|Set lock flag on cached item.  
 
|Set lock flag on cached item.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::remove/11.1|remove]]
+
|[[API17:JCache::remove|remove]]
 
|Remove a cached data entry by id and group.  
 
|Remove a cached data entry by id and group.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::setCaching/11.1|setCaching]]
+
|[[API17:JCache::setCaching|setCaching]]
 
|Set caching enabled state.  
 
|Set caching enabled state.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::setLifeTime/11.1|setLifeTime]]
+
|[[API17:JCache::setLifeTime|setLifeTime]]
 
|Set cache lifetime.  
 
|Set cache lifetime.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::store/11.1|store]]
+
|[[API17:JCache::store|store]]
 
|Store the cached data by id and group.  
 
|Store the cached data by id and group.  
 
|-
 
|-
 
|public  
 
|public  
|[[JCache::unlock/11.1|unlock]]
+
|[[API17:JCache::unlock|unlock]]
 
|Unset lock flag on cached item.  
 
|Unset lock flag on cached item.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::addIncludePath/11.1|addIncludePath]]
+
|[[API17:JCache::addIncludePath|addIncludePath]]
 
|Add a directory where  should search for handlers.  
 
|Add a directory where  should search for handlers.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::getInstance/11.1|getInstance]]
+
|[[API17:JCache::getInstance|getInstance]]
 
|Returns a reference to a cache adapter object, always creating it.  
 
|Returns a reference to a cache adapter object, always creating it.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::getStores/11.1|getStores]]
+
|[[API17:JCache::getStores|getStores]]
 
|Get the storage handlers.  
 
|Get the storage handlers.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::getWorkarounds/11.1|getWorkarounds]]
+
|[[API17:JCache::getWorkarounds|getWorkarounds]]
 
|Perform workarounds on retrieved cached data.  
 
|Perform workarounds on retrieved cached data.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::makeId/11.1|makeId]]
+
|[[API17:JCache::makeId|makeId]]
 
|Create safe id for cached data from url parameters set by plugins and framework.  
 
|Create safe id for cached data from url parameters set by plugins and framework.  
 
|-
 
|-
 
|public static  
 
|public static  
|[[JCache::setWorkarounds/11.1|setWorkarounds]]
+
|[[API17:JCache::setWorkarounds|setWorkarounds]]
 
|Create workarounded data to be cached.  
 
|Create workarounded data to be cached.  
 
|-
 
|-
 
|}
 
|}
 
* '''Defined in''' libraries/joomla/cache/cache.php
 
* '''Defined in''' libraries/joomla/cache/cache.php
* '''Extends''' [[JObject/11.1|JObject]]
+
* '''Extends''' [[API17:JObject|JObject]]
 
===Importing===
 
===Importing===
 
<source lang="php">jimport( 'joomla.cache.cache' );</source>
 
<source lang="php">jimport( 'joomla.cache.cache' );</source>
 
===See also===
 
===See also===
 
* {{JVer|11.1}} '''JCache source code''' on [[jplatform:cache/cache.php|BitBucket]]
 
* {{JVer|11.1}} '''JCache source code''' on [[jplatform:cache/cache.php|BitBucket]]
* {{JVer|11.1}} Subpackage [[Subpackage Cache/11.1|Cache]]
+
* {{JVer|11.1}} Subpackage [[API17:Subpackage Cache|Cache]]
* [[JCache|Other versions of JCache]]
+
* [[API17:JCache|Other versions of JCache]]
{{SeeAlso:JCache}}
+
 
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[SeeAlso:JCache|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
 
===User contributed notes===
 
===User contributed notes===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JCache
 
category=JCache
category=CodeExample
+
namespace=CodeExample
 
category=ClassExample
 
category=ClassExample
 
include=*
 
include=*
Line 113: Line 109:
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:Platform JClasses]][[Category:Platform 11.1]][[Category:JCache]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

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.

Joomla 11.1 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]


User contributed notes[edit]

Code Examples[edit]