JCache/1.5
From Joomla! Documentation
< JCache(Difference between revisions)
(Bulk upload by Doxiki2) |
(Layout updates) |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|1.5}} JCache== | ||
| + | ===Description=== | ||
| + | {{Description:JCache}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JCache|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JCache|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JCache::__construct/1.5|__construct]] | |[[JCache::__construct/1.5|__construct]] | ||
|Constructor. | |Constructor. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::_getStorage/1.5|_getStorage]] | |[[JCache::_getStorage/1.5|_getStorage]] | ||
|Get the cache storage handler. | |Get the cache storage handler. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::clean/1.5|clean]] | |[[JCache::clean/1.5|clean]] | ||
|Clean cache for a group given a mode. | |Clean cache for a group given a mode. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::gc/1.5|gc]] | |[[JCache::gc/1.5|gc]] | ||
|Garbage collect expired cache data. | |Garbage collect expired cache data. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::get/1.5|get]] | |[[JCache::get/1.5|get]] | ||
|Get cached data by id and group. | |Get cached data by id and group. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::getStores/1.5|getStores]] | |[[JCache::getStores/1.5|getStores]] | ||
|Get the storage handlers. | |Get the storage handlers. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::remove/1.5|remove]] | |[[JCache::remove/1.5|remove]] | ||
|Remove a cached data entry by id and group. | |Remove a cached data entry by id and group. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::setCacheValidation/1.5|setCacheValidation]] | |[[JCache::setCacheValidation/1.5|setCacheValidation]] | ||
|Set cache validation. | |Set cache validation. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::setCaching/1.5|setCaching]] | |[[JCache::setCaching/1.5|setCaching]] | ||
|Set caching enabled state. | |Set caching enabled state. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::setLifeTime/1.5|setLifeTime]] | |[[JCache::setLifeTime/1.5|setLifeTime]] | ||
|Set cache lifetime. | |Set cache lifetime. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::store/1.5|store]] | |[[JCache::store/1.5|store]] | ||
|Store the cached data by id and group. | |Store the cached data by id and group. | ||
|- | |- | ||
| + | |public | ||
|[[JCache::getInstance/1.5|getInstance]] | |[[JCache::getInstance/1.5|getInstance]] | ||
|Returns a reference to a cache adapter object, always creating it. | |Returns a reference to a cache adapter object, always creating it. | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/cache/cache.php | ||
| + | * '''Extends''' [[JObject/1.5|JObject]] | ||
| + | * '''Extended by''' | ||
| + | ** [[JCacheCallback/1.5|JCacheCallback]] | ||
| + | ** [[JCacheOutput/1.5|JCacheOutput]] | ||
| + | ** [[JCachePage/1.5|JCachePage]] | ||
| + | ** [[JCacheView/1.5|JCacheView]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.cache.cache' );</source> | <source lang="php">jimport( 'joomla.cache.cache' );</source> | ||
===See also=== | ===See also=== | ||
| + | * {{JVer|1.5}} '''JCache''' on [http://api.joomla.org/Joomla-Framework/Cache/JCache.html api.joomla.org] | ||
| + | * {{JVer|1.5}} '''JCache source code''' on [[jframework15:cache/cache.php|JoomlaCode]] | ||
| + | * {{JVer|1.5}} Subpackage [[Subpackage Cache/1.5|Cache]] | ||
| + | * [[JCache|Other versions of JCache]] | ||
| + | {{SeeAlso:JCache}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JCache|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JCache|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | + | ===User contributed notes=== | |
| − | + | ||
| − | + | ||
| − | === | + | |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 75: | Line 88: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JCache]]</noinclude> | <noinclude>[[Category:Framework]][[Category:Framework 1.5]][[Category:JCache]]</noinclude> | ||
Revision as of 18:06, 25 April 2011
JCache
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 [Edit Descripton]
Methods
| 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 | getStores | Get the storage handlers. |
| public | remove | Remove a cached data entry by id and group. |
| public | setCacheValidation | Set cache validation. |
| public | setCaching | Set caching enabled state. |
| public | setLifeTime | Set cache lifetime. |
| public | store | Store the cached data by id and group. |
| public | getInstance | Returns a reference to a cache adapter object, always creating it. |
- Defined in libraries/joomla/cache/cache.php
- Extends JObject
- Extended by
Importing
jimport( 'joomla.cache.cache' );
See also
-
JCache on api.joomla.org
-
JCache source code on JoomlaCode
-
Subpackage Cache
- Other versions of JCache
SeeAlso:JCache [Edit See Also]
User contributed notes
<CodeExamplesForm />