Joomla Cache: one-click clean

Joomla automatically takes care of cleaning the cache.  However this is a fairly complex feature and can fail to work in several scenarios:


  • You use some modules whose cache is not cleared when articles are movedJoomla clear cache
  • Some extensions respond only to a limited set of changes, i.e. onContentSave but not on feature item reorder
  • There is a privilege issue when cleaning the cache

In these circumstances sometimes even going to Site->Maintenance->Clear cache may not work.

This often leads to users complaining about the site not working consistently, and if you try to drill down to the issue, endless hours of clueless debugging await you since the Joomla! code really makes sense! (at least to me).

Clear cache easily from the backend

Joomla Little Helper features a cache clean function, which is also available as a status module, which allows users to clean (selected) cache items with a single click.

Joomla Cache clean status module

As all other features, with the options you can limit its action to a subset of extensions:

Joomla Cache clean options

Technique for cleaning the cache

Joomla Little Helper first attempts a system command (rm -rf) to clear the cache in the fastest way.  After the command has run, a php function takes over and attempts to remove any remaining files (matching the query).  This double pass ensures that the cache is really cleaned and removes the primary cause of your headaches.