Page 1 of 1

Managing Extension Caching

Posted: Wed Feb 20, 2008 7:36 am
by permalink
What needs to be done to manage extension caching? I have followed the cache tutorial - http://dev.joomla.org/component/option, ... g/&s=cache - but it doesn't really make it clear what does/doesn't need to be done to introduce framework based caching.

Do I need to manually set

Code: Select all

$cache->setCaching( 1 );
based on ext params?

Do I need to ensure that wrap method calls like so:

Code: Select all

$rows  = $cache->call( 'testFunction' );
I have experimented with adding a cache param to an extension, as I have seen some core modules use it, and noticed that it does seem to be honored independently of any global cache settings, without writing any code to handle it (am I correct?):

[code]<param name="cache" type="list" default="1" label="Caching" description="Cache On or Off">
<option value="1">Use global</option>
<option value="0">No caching</option>
</param>[/code]


However the time param does not seem to be honored:

[code]<param name="cache_time" type="text" default="900" label="Cache Time" description="Time before the module is recached" />[/code]

It seems some extension use advanced caching and I would like to know what some scenarios are for implementing something like that. Thanks.