API16

Difference between revisions of "JCacheCallback"

From Joomla! Documentation

(New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JCacheCallback}} ===Define...)
 
m (preparing for archive only)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
+
JCacheCallback is a concrete cache handler. It caches and returns the output and results of callback functions.
<nowiki>[</nowiki>[[Description:JCacheCallback|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
{{Description:JCacheCallback}}
 
  
 
===Defined in===
 
===Defined in===
Line 18: Line 15:
 
|Executes a cacheable callback if not found in cache else returns cached output and result
 
|Executes a cacheable callback if not found in cache else returns cached output and result
 
|}
 
|}
 +
 
===Importing===
 
===Importing===
 
<source lang="php">jimport( 'joomla.cache.handler.callback' );</source>
 
<source lang="php">jimport( 'joomla.cache.handler.callback' );</source>
  
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[SeeAlso:JCacheCallback|Edit See Also]]<nowiki>]</nowiki>
+
 
</span>
 
{{SeeAlso:JCacheCallback}}
 
  
 
===Examples===
 
===Examples===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
  noresultsheader=\n
 
  noresultsheader=\n
 
  category=JCacheCallback
 
  category=JCacheCallback
  category=CodeExample
+
  namespace=CodeExample
 
  category=ClassExample
 
  category=ClassExample
 
  include=*
 
  include=*
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>

Latest revision as of 20:22, 24 March 2017

The "API16" 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.

JCacheCallback is a concrete cache handler. It caches and returns the output and results of callback functions.

Defined in[edit]

libraries/joomla/cache/handler/callback.php

Methods[edit]

Method name Description
call Executes a cacheable callback if not found in cache else returns cached output and result
get Executes a cacheable callback if not found in cache else returns cached output and result

Importing[edit]

jimport( 'joomla.cache.handler.callback' );



Examples[edit]

Code Examples[edit]