API16

JCache: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JCache}} ===Defined in=== librari...
 
m preparing for archive only
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
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
<nowiki>[</nowiki>[[Description:JCache|Edit Descripton]]<nowiki>]</nowiki>
</span>
{{Description:JCache}}


===Defined in===
===Defined in===
Line 42: Line 39:
|Returns a reference to a cache adapter object, always creating it
|Returns a reference to a cache adapter object, always creating it
|}
|}
===Importing===
===Importing===
<source lang="php">jimport( 'joomla.cache.cache' );</source>
<source lang="php">jimport( 'joomla.cache.cache' );</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JCache|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JCache}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=JCache
  category=JCache
  category=CodeExample
  namespace=CodeExample
  category=ClassExample
  category=ClassExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 01:21, 25 March 2017

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

Defined in

libraries/joomla/cache/cache.php

Methods

Method name Description
__construct Constructor
getStores Get the storage handlers
setCaching Set caching enabled state
setLifeTime Set cache lifetime
get Get cached data by id and group
store Store the cached data by id and group
remove Remove a cached data entry by id and group
clean Clean cache for a group given a mode.
gc Garbage collect expired cache data
getInstance Returns a reference to a cache adapter object, always creating it

Importing

jimport( 'joomla.cache.cache' );



Examples

Code Examples