Template Cache Clear
Template Cache Clear is a free Joomla system plugin that empties Joomla's page cache when you save a site template style or make one the default. Visitors then see your template change on their next page load, instead of whenever the cached copies of your pages run out.
Joomla's System - Page Cache plugin keeps a copy of each page for visitors who aren't logged in, for 15 minutes by default. Joomla clears its own template caches when you save a style, but it leaves those cached pages alone, so a new colour or logo can take up to 15 minutes to reach visitors. This plugin closes that gap. It works with any site template.
New to Template Cache Clear? This page is the reference manual. For an overview of what Template Cache Clear does, with the download, see its page on cybersalt.com.
Release history. This page documents the current release, 1.0.0. For what changed in each version, see the changelog.
Requirements. Joomla 5 or Joomla 6, and PHP 8.1 or newer. It only makes a difference when the System - Page Cache plugin is switched on.
Template Cache Clear is free and open source, available from cybersalt.com.
Installing
- Download the zip (
plg_system_cstemplatecacheclear_v*.zip) from cybersalt.com. - In your Joomla admin go to System → Install → Extensions and upload the zip.
- That's all. The plugin switches itself on, and every site template style now has the switch on. The install message has buttons to open Site Template Styles and the plugin settings.
The plugin is listed under System → Manage → Plugins as System - Cybersalt Template Cache Clear. Updates come through System → Update → Extensions like any other extension, and the Changelog button there shows what's new. Updating keeps your settings.
Our VirtueMart Templates and Energize Themes templates install it for you from their next release, so if you use one of those you may already have it.
The Cache tab on each template style
Open any site template style (System → Site Template Styles, then click the style's name) and you'll find a Cache tab with one switch, Clear cache on save. It's on unless you turn it off, including on styles that were saved before the plugin was installed.
⤢ Click to enlarge
With the switch on, the page cache is emptied when:
- you click Save or Save & Close on that style,
- you make that style the default (the star in Site Template Styles), or take a language default away from it on a multilingual site,
- the style is saved from the front-end Template Settings screen, or through Joomla's Web Services API (for example by an AI assistant using MCP for J).
Turn the switch off for a style you're testing changes on, if you'd rather the live site keeps its cached pages until you're done. Duplicate never empties the cache, because a new copy of a style can't be showing on the site yet. Administrator template styles don't get the tab: the admin area is never page-cached.
Template authors. If a template declares its own clearcacheonsave
field in templateDetails.xml, the plugin adds no tab and uses that field instead, so you
can put the switch wherever it fits in your template's own settings. 0 means off;
anything else, or no value, means on.
The message after saving
When the page cache has been emptied, a short message joins Joomla's usual "Style saved." so you know visitors will see the change.
⤢ Click to enlarge
The message only appears when System - Page Cache is on, since otherwise there's no page cache to empty. If the cache can't be emptied (for example the cache folder isn't writable), you get a yellow warning instead, and your style is still saved: clear it yourself under System → Clear Cache.
Plugin settings
⤢ Click to enlarge
| Setting | Default | What it does |
|---|---|---|
| Show a message | Yes | Shows the "page cache was emptied" message after a save. Set it to No if you don't want it; the cache is still emptied. |
| File check | — | Not a setting: it tells you whether every installed file matches the release. |
The switch for each style lives on the style itself (see the Cache tab), so there's nothing else to set up here.
CDNs and other caches
The plugin empties Joomla's own page cache, wherever Joomla keeps it (the cache folder, or Redis, Memcached or APCu if you've chosen one in Global Configuration). It doesn't touch:
- a CDN in front of your site, such as Cloudflare,
- your host's server cache, such as LiteSpeed or SiteGround's Dynamic Cache,
- other caching extensions, which keep their own copies,
- your browser's cache.
Clear those yourself after a template change. If you'd like them cleared automatically too, Regular Labs Cache Cleaner Pro can purge Cloudflare and several other CDNs and server caches, and it runs happily alongside this plugin.
Only the page cache is emptied. The rest of Joomla's cache stays warm, so the site doesn't slow down after a save while everything rebuilds.
Good to know
- It switches itself on only once. The plugin enables itself the first time you install it. If you switch it off, an update leaves it off.
- Logged-in users never saw the old page. Joomla's page cache only serves visitors who aren't logged in, so when you check your change while logged in, you always see the new version. Check in a private window to see what visitors get.
- The first visit after a save is a little slower while Joomla builds a fresh copy of the page, the same as after System → Clear Cache.
- Uninstalling a template doesn't remove it. Our templates install the plugin as a separate extension, so removing one template leaves it working for the others.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Visitors still see the old look after a save | Check that Clear cache on save is on for the style you saved, and that the plugin is enabled under System → Manage → Plugins. If both are fine, the old copy is coming from a CDN, a server cache or the visitor's browser (see CDNs and other caches). |
| No message after saving | System - Page Cache is off (then there's nothing to empty), or Show a message is set to No in the plugin settings. |
| A yellow "could not be emptied" warning | Joomla couldn't delete the cached pages, usually because the cache folder isn't writable or the cache server (Redis, Memcached) isn't reachable. Your style was saved; clear the cache under System → Clear Cache and check the folder permissions or the cache settings in Global Configuration. |
| No Cache tab on a template style | It's an administrator template style (they don't get one), the plugin is disabled, or the
template declares its own clearcacheonsave field and shows the switch on one of
its own tabs. |
| The File check says files are missing or differ | An install or update didn't finish, or someone edited the files. Install the same package again. If that fails too, security software on the server (for example Imunify360 Proactive Defense) may be blocking Joomla's installer. |
Getting help
Questions and bug reports are welcome through the Cybersalt support form or GitHub.
You'll get the quickest answer if you include your Joomla and PHP versions, the plugin version (shown in System → Manage → Extensions), which template you use, and whether your site sits behind a CDN.
Template Cache Clear is developed by Cybersalt Consulting Ltd. and released under the GNU General Public License v2 or later. Cache Cleaner is a product of Regular Labs; this plugin is not affiliated with or endorsed by it.
The message after saving — click anywhere to closeClose ×
The plugin settings — click anywhere to closeClose ×