| 
 
I want to develop a component with Page Cache in mind...

Well, for most cases, there are no special concerns that need to be take when developing the component. With that said, here are the things to consider.

  • You can create a cache reset plugin by using the XML plugin format described in the FAQs. So if you are developing an interactive component, you can have it reset the cache whenever user information is submitted (by having the users add the plugin).
  • If your component accepts information outside of the Joomla framework (aka by submitting data to a file other than index.php, such as in AJAX requests or Cron based automation), you have that file clear the page cache. You can do that with the following code:

To clear the cache from another file (note that the $database object MUST be initialized with the default Joomla database.php) :

if(file_exists($mosConfig_absolute_path.'/components/com_page_cache/page_cache.class.php')) {
require_once ($mosConfigure_absoulte_path.'/components/com_page_cache/page_cache.class.php');
global $pageCache;
$pageCache->clear();
}

Tags
0% of 0 voters found this FAQ useful,  I found this FAQ  useful useful  not useful not useful
< Prev   Next >
feed image
Copyright 2007 Anthony Ferrara, All Rights Reserved