JCache

From Joomla! Documentation
(Difference between revisions)
Jump to: navigation, search
(Concrete Cache Storage Handlers)
m (bad link repair)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''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]]
+
This class is available in the following Joomla versions:-
 
+
<splist showpath=notparent />
===Availability===
+
<noinclude>[[Category:Platform JClasses]][[Category:JCache]]</noinclude>
{{JVer|1.5|From Joomla 1.5}} {{JVer|1.6|Joomla 1.6}}
+
 
+
===Defined in===
+
/libraries/joomla/cache/storage.php
+
 
+
===Extends===
+
* [[JObject]]
+
 
+
===Extended by===
+
* [[JCacheView]]
+
* [[JCachePage]]
+
* [[JCacheCallback]]
+
* [[JCacheOutput]]
+
 
+
===Methods===
+
{| class="wikitable"
+
|-
+
!Method name
+
!Description
+
|-
+
|[[JCache/__construct|__construct]]
+
|Constructor. It sets the caching options, like the language, the caching base directory path, but most importantly the storage engine to be used (See: [[JCacheStorage]]).
+
|-
+
|[[JCache/clean|clean]]
+
|Clean the cache of a certain group. See [[JCacheStorage/clean|JCacheStorage::clean()]].
+
|-
+
|[[JCache/gc|gc]]
+
|Garbage collect expired cache data. See [[JCacheStorage/gc|JCacheStorage::gc()]].
+
|-
+
|[[JCache/get|get]]
+
|Returns cached data by id and group. See [[JCacheStorage/get|JCacheStoragge::get()]].
+
|-
+
|[[JCache/getInstance|getInstance]]
+
|Returns a concrete cache handler object, depending of the passed caching type paramter.
+
|-
+
|[[JCache/getStores|getStores]]
+
|Get the storage handlers that have been defined in the joomla caching library (<code>libraries/joomla/cache/storage/</code>
+
|-
+
|[[JCache/remove|remove]]
+
|Remove a cached data entry by id and group. See [[JCacheStorage/remove|JCacheStorage::remove()]]
+
|-
+
|[[JCache/setCacheValidation|setCacheValidation]]
+
|Depreceated.
+
|-
+
|[[JCache/setCaching|setCaching]]
+
|Set caching enabled state. Pass true to enable caching.
+
|-
+
|[[JCache/setLifeTime|setLifeTime]]
+
|Set cache lifetime
+
|-
+
|[[JCache/store|store]]
+
|Store the cached data by id and group. See [[JCacheStorage/store|JCacheStorage::store()]]
+
|}
+
===Importing===
+
<source lang="php">jimport( 'joomla.cache.storage' );</source>
+
 
+
===See also===
+
* [http://api.joomla.org/Joomla-Framework/Cache/JCache.html JCache on api.joomla.org]
+
==== Concrete Caching Handlers ====
+
* [[JCacheView]]
+
* [[JCachePage]]
+
* [[JCacheCallback]]
+
* [[JCacheOutput]]
+
====Abstract Cache Storage Handler ====
+
* [[JCacheStorage]]
+
 
+
==== Concrete Cache Storage Handlers ====
+
* [[JCacheStorageApc]]
+
* [[JCacheStorageEaccelarator]]
+
* [[JCacheStorageFile]]
+
* [[JCacheStorageMemcache]]
+
* [[JCacheStorageXCache]]
+
* [[JSessionStorageXcache]]
+
<noinclude>[[Category:Development]][[Category:Framework]][[Category:JCache]]</noinclude>
+

Latest revision as of 13:30, 29 August 2012

This class is available in the following Joomla versions:-

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox