|
|
| (5 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/cache.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. Needs to be overridden by a concrete cache handler.
| + | |
| − | |-
| + | |
| − | |[[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.cache' );</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]]
| + | |
| − | * [[JCacheStorageEaccelerator]]
| + | |
| − | * [[JCacheStorageFile]]
| + | |
| − | * [[JCacheStorageMemcache]]
| + | |
| − | * [[JCacheStorageXCache]]
| + | |
| − | * [[JSessionStorageXcache]]
| + | |
| − | <noinclude>[[Category:Development]][[Category:Framework]][[Category:JCache]]</noinclude> | + | |