Cache Cleaner

Clean cache fast in Joomla!

  • Last updated: 11 Jun 2019
  • Version: 7.0.1
  • Types: Admin module System plugin
  • Joomla rating: 100%

Tutorial for Cache Cleaner

There is a Free and a Pro version of Cache Cleaner.
The parts in this tutorial that only concern the Pro version will be marked with: Pro only

Introduction

Cache Cleaner is a Joomla! Administrator system plugin (and module), that allows you to clean your Joomla! cache fast and easily via a link in the Administrator panel - and much more.

If you are using caching in Joomla!, you will need to clear your cache after making changes to your website. Normally this means having to navigate away from the current page, go to the Joomla! Cache Manager, and then delete all cache. This is very annoying and requires a lot of clicks and waiting time.

With Cache Cleaner this can be done from any page of the backend, and with just one click. And it doesn't even need to reload the page either, because it uses ajax to clear the cache in the background.

Not only that, it also gives you the possibility to clear server cache, external CDN cache, 3rd party cache, do a Global Check-in, empty the tmp folder, empty user-defined folders and database tables… all with just 1 click! So no more clickety-click to get to the core Joomla! Cache Manager, and no more having to manually delete files.

Cache Cleaner can also clear Joomla! cache automatically when you save an article or other item. And you can even set it to clear your cache and custom folders at preset intervals.

Administrator Quick Link

Using Cache Cleaner is very simple. The most straight-forward way of clearing cache is by using the quick link in the Administrator panel.

After installing Cache Cleaner, on all your Joomla administrator pages you will see a "Clean Cache" link (with icon) in the bottom bar of the backend (the "status" bar module position):

Toolbar Button

Alternatively, you can also use a button in the Toolbar position of the backend. This will first need to be enabled via the system plugin settings.

Once enabled, on all your Joomla administrator pages you will also see a "Clean Cache" button in the toolbar.

Cache Cleaner Button

That's it! By using either the link or the button, with just 1 click your cache will be cleaned - and optionally a whole lot more.

Progress Bar

Cache Cleaner doesn't even need to reload the page, because it uses ajax to clear the cache in the background. This means you can literally clear the cache at any time, even while editing an article, without leaving the page.

After clicking on the "Clean Cache" button, Cache Cleaner will show a progress bar at the top of your screen. This will turn green when the cache is successfully cleaned.

The message will also show the total size (KB or MB) of the cache and files that have been cleaned.

Cache Cleaner Progress Bar

What you can clean

Cache Cleaner doesn't stop at emptying the Joomla! cache folders.

Infact, you have the possibility to clear a lot more additional stuff, including server cache, external CDN cache, 3rd party cache, do a Global Check-in, empty the tmp folder, empty user-defined folders, database tables... and much more!

You can enable or disable each option via the Cache Cleaner system plugin settings, and you can even set it to happen automatically or at certain intervals.

Here is the full list of things that you can clear or empty by using the Regular Labs Cache Cleaner plugin:

Joomla Cache

Enabled by default, you can of course clean the cache stored by Joomla. This includes the Global Configuration Cache (Conservative/Progressive), Page Cache, expired cache, and the cache used for checking updates.

You can also select to automatically do a Global Check-In to unlock any checked-out items.

The Pro version allows you to set the minimum age (in minutes) of the files to delete.

Temp Folder

You can select to have the tmp folder emptied when cleaning cache.

The Pro version allows you to set the minimum age (in minutes) of the files to delete.

Custom Folders Pro only

With the Pro version of Cache Cleaner, you can select to have custom folders emptied when cleaning cache.

You can enter the paths of any folders in your site that you want to empty, and you can also set the minimum age (in minutes) of the files to delete.

Note: Please use with care. If you enter a folder that has important files/folders, you will lose them when cache is cleaned! So only use this for folders where you want to frequently empty the content.

Database Tables Pro only

With the Pro version of Cache Cleaner, you can select to have custom Database Tables emptied when cleaning cache.

You can enter a list of database table names of your site that you want to empty.

Note: Please use with care. If you enter names of tables with important data, you will lose it when cache is cleaned! So only use this for tables where you want to frequently empty the content.

Server Cache Pro only

Cache Cleaner even allows you to magically flush Server Cache, depending on which server your site is running. This includes:

  • LiteSpeed Cache
  • OPcache
  • SiteGround Cache (Static/Dynamic)

So no more need to log into different panels to clear server cache. It can all be done with Cache Cleaner, with the easy single click!

CDN Cache Pro only

If you use CloudFlare or any CDN for your site, you will also be able to purge their cache thanks to the Pro version of Cache Cleaner. This includes:

  • CloudFlare cache
  • MaxCDN cache
  • KeyCDN cache
  • CDN77 cache

3rd Party Cache Pro only

The Pro version also gives you the ability to clear cache generated by the JotCache extension, if you have it installed on your site.

Query URL Pro only

Finally, with the Pro version, you can also enter a custom url that gets queried (triggered) after cleaning all the other caches.

This url will be queried in the background as the last step in the cleaning process. So you can use it to trigger a url that re-generates cache, or run a custom external script, etc.

Frontend Secret URL

You can make Cache Cleaner clean your cache without even having to log into the administrator.

By defining a secret word in the system plugin settings, you can then simply use it in any frontend URL of your website, enabling you to clean the cache directly from the frontend.

For example, let's say your secret word is set to: mysecret.

You can then simply place your secret word after a cleancache= parameter in url, like:

http://www.yourdomain.com?cleancache=mysecret
http://www.yourdomain.com/some-page?cleancache=mysecret
http://www.yourdomain.com/index.php?option=com_content&...&cleancache=mysecret

This will trigger the Cache cleaning process, and will show you a success message after the cache is cleared.

Note: as a prefix before cleancache, use a ? for SEF urls, or & for urls that already have variables.

Cron Jobs

You can use the above explained Frontend Secret URL to clean cache also via a server Cron Job (a task that you schedule to run automatically at specific intervals).

To make the page load as fast as possible, and not have it load any frontend html when using a Cron Job, you can add &break=1 to the url:

http://www.yourdomain.com?cleancache=mysecret&break=1

You will probably need to use wget to call the url via the cron job. Ask your host if you require instructions on how to set it up.

The cron job command will have to be something like:

wget -q -O /dev/null "http://www.yourdomain.com?cleancache=mysecret&break=1"

Or:

/usr/bin/wget -q -O /dev/null "http://www.yourdomain.com?cleancache=mysecret&break=1"

Automatic Cleaning

Cache Cleaner can also clear Joomla! cache automatically when you save (or apply) an article or other item. You can choose to enable this feature on the administrator and/or the frontend.

You can also enter a comma separated list of other tasks to consider as a save. Tasks can include things like publish, unpublish, delete, etc.

And with the Pro version of Cache Cleaner, you can even set to trigger the cleaning process at preset intervals.

Keyboard Shortcut

Do you have the Regular Labs Keyboard Shortcuts plugin installed?

If you have the Pro version of Keyboard Shortcuts, it will let you use a hotkey combination to trigger Cache Cleaner and clean the cache!

No matter where you are in your backend, from any page or view you will have a shortcut to clean your cache even faster.

The default hotkey combination for Cache Cleaner is SHIFT+CTRL+ALT+C (or SHIFT++ALT+C for Mac).

Settings

Cache Cleaner is packed with options, giving you control over how it works and behaves. Here is the full list of the options you can find in the Cache Cleaner system plugin settings.

What to clean

You can enable or disable each feature, or optionally decide to trigger them only when cleaning via the administrator button.

Joomla Cache

Purge Cache This will clean the cache stored by Joomla! (not the browser's cache)
Minimum Age (in minutes) Set the minimum age (in minutes) of the files to delete. The age is measured from the last time the file was modified.
Clear Expired Cache Enable to purge the expired cache when cleaning cache.
Purge Update Cache Enable to purge the cache in the updates table (used for checking updates for Joomla! and extensions) when cleaning cache.
Global Check-in Enable to do a global check-in. This will unlock any checked-out items.

Temp Folder

Empty tmp Folder Select to have the tmp folder emptied when cleaning cache.
Minimum Age (in minutes) Set the minimum age (in minutes) of the files to delete. The age is measured from the last time the file was modified.

Custom Folders Pro only

Empty Custom Folders Select to have the custom folders emptied when cleaning cache.
Custom Folders Enter the paths of extra folders you want emptied. The path should be relative to the root of the site. One path per line.

WARNING: Please use with care. If you enter a folder that has important files/folders, you will lose them when cache is cleaned!
Minimum Age (in minutes) Set the minimum age (in minutes) of the files to delete. The age is measured from the last time the file was modified.

Database Tables Pro only

Clean Database Tables Select to have custom Database Tables emptied when cleaning cache.
Database Tables A comma or enter separated list of database table names you want emptied.
You may use #__ as a placeholder for your Joomla database prefix, like #__dbcache instead of jos_dbcache.

WARNING: Please use with care. If you enter names of tables with important data, you will lose it when cache is cleaned!

Server Cache Pro only

LiteSpeed Purge the servers LiteSpeed cache when cleaning cache. This only works when your server is using LiteSpeed caching.
OPcache Purge the servers OPcache when cleaning cache. This only works when your server is using OPcache.
SiteGround Cache Purge the SiteGround Cache. You can only use this if your site is running on a SiteGround server on which Static/Dynamic Cache is active.

CDN Cache Pro only

CloudFlare Purge the CloudFlare cache. You can only use this if your have an active CloudFlare account.
MaxCDN Purge the MaxCDN cache. You can only use this if your have an active MaxCDN account.
KeyCDN Purge the KeyCDN cache. You can only use this if your have an active KeyCDN account.
CDN77 Purge the CDN77 cache. You can only use this if your have an active CDN77 account.

3rd Party Cache Pro only

JotCache Clean the cache made by the JotCache extension, if it is installed

Query URL Pro only

Query Url Let Cache Cleaner query a custom url in the background after purging all other caches.
URL Enter the full url to query when purging the cache. This url will be queried in the background.

How to clean it

Administrator Quick Link

Clean cache with a simply click!

Display link How do you want the link to be displayed?
Options: Icon only, Text only, Both
Link Text The text to display as link.
Display Toolbar Button Select to show a button in the toolbar.

Frontend secret URL

You can define a secret word that you can use in a frontend URL to be able to clean the cache from a frontend URL.
Place your secret word after cleancache=, like:
http://www.yourdomain.com/index.php?cleancache=your_word
http://www.yourdomain.com/index.php?option=com_content&...&cleancache=your_word

Frontend secret Enter a word that can be placed in a frontend URL to clean cache.
...&cleancache=your_word
Show message Enable to show a message when cache is cleaned.

Automatic cleaning on Save

Cleans the cache if you save (or apply) something

Enable on Administrator Cleans the cache if you save (or apply) something from the administrator panel.
Enable on Frontend Cleans the cache if you save (or apply) something from the frontend.
Show message Enable to show a message when cache is cleaned.
Clean on tasks Comma separated list of tasks to consider as a save. You can also add tasks like publish, unpublish, remove, etc.

Automatic cleaning by Interval Pro only

Cleans the cache every so many seconds

Enable on Administrator Cleans the cache every so many seconds from the administrator panel.
Enable on Frontend Cleans the cache every so many seconds from the frontend.
Seconds Enter the interval in seconds. The cache will be cleaned on pageload if it hasn't been cleaned for more than so many seconds.
Show message Enable to show a message when cache is cleaned.

Advanced

Show Size Enable to show the total size of the cleaned cache in the message.
Ignore Files/Folders Enter the paths of folders and files you don't want to be removed when cleaning cache. The path should be relative to the root of the site. One path per line.
Log Path The path of the log file used to store the time of the last clean. The file 'cachecleaner_lastclean.log' will be stored in this folder. Make sure your Joomla! setup is able to write to this folder.

Installation

You can either install Cache Cleaner by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful Regular Labs Extension Manager.

Note: When updating Cache Cleaner, you do not need to uninstall it first. The package will update all the files automatically.

Keep in mind that when you update to a major new version (or uninstall first), you might lose some configuration settings.

Regular Labs Extension Manager

It is very easy to install/update any Regular Labs Extension using the Regular Labs Extension Manager.

Please see the Tutorial for the Regular Labs Extension Manager for more detailed information...

Joomla! Extension Manager

To install via the Joomla! Extension Manager, just follow these steps:

  1. Log into your Joomla administrator;
  2. In the menu, choose: Extensions >> Extensions;
  3. Choose the tab: Install from Web (or enable it if you haven't done so yet);
  4. Select the search field and enter Cache Cleaner and hit enter;
  5. Click on the Cache Cleaner listing;
  6. Click on Install;
  7. Click on Install to confirm.
Installer Web

Or if you need to install the Pro version or cannot install via the 'Install via Web' method for some reason:

  1. Download the extension install file (.zip);
  2. Log into your Joomla administrator;
  3. In the menu, choose: Extensions >> Extensions;
  4. Choose the tab: Upload Package File;
  5. Click on the Choose File button and select the extension zip;
  6. Click on Upload & Install.
Installer Upload

If you have problems installing Cache Cleaner, please try the manual installation process as described here: docs.joomla.org/Installing_an_extension