Search Engine Optimization & Performance tuning for your Joomla website

Web Hosting

Joomla caching

Want to support this site? Buy my E-book: Joomla 3.5 SEO & Performance!

Caching is the mechanism that offers users a stored view of (part of) a web page so that does not have to be pulled from the database. This usually speeds up the load time of a web page, but the disadvantage could be that a user looks at a stored view, while the actual page has been changed in the mean time. Whether or not this is a problem depends per site. When you are busy developing a site, making a lot of changes, it is also probably best to leave caching switched off. Also, there could be functionality that does not work well with caching, like some captcha's, forms webshop extensions (Virtuemart, Hikashop a.o.).

For this reason, a default Joomla installation ships with caching switched off. Joomla core offers a number of possibilities to use caching, in multiple locations: Component, Module or Page. The stored views for this are stored in the filesystem for Joomla, in the cache folder, as you can see when caching is switched on:


You can see com_* for component views, mod_* for module views and page for full-page views. When you examine the files in these folders, you can see the relevant content.

Global Configuration - System tab - Cache Settings

joomla-cache-optionsThis setting controls the component-caching. Joomla offers 3 possibilities to use caching here:

0 - Off
1- Conservative caching
2- Progressive caching

Progressive caching can cause unexpected issues in rare cases, so it is advised to use the conservative option. This turns on caching for parts of pages.

The Cache Handler can only be set to "File". Joomla actually offers more options (like mem-cache for database caching), but it takes advanced users to enable this, with additional plugins and set-up.

What is worth looking at is Cache Time. Default is 15 minutes, but for sites that are not updated often, you could set this much higher.

Module caching

On a per module basis, you can override the Global setting for cache. You can only switch it off when on a global level it is switched off, not the other way around. The override mechanism does not work well when the System - Cache plugin is switched On.

System - Cache plugin

This plugin switches on caching for the whole page being accessed. This can speed up your site considerably. However, especially for pages that need interaction with the user, or non-static content, issues are known, so test carefully. Also the stored views can increase the size of your hosting-account. Best use is for simple, small, static sites, but many sites are like this: on the plugin works perfect.

Activation is easy: in the Plugin Manager, look up the "System - Cache" plugin and enable it. Optionally you can switch on the "Use browser caching" option, but it is only useful for sites where users ofter return to a page that they already accessed within a browsing session and it can also cause issues, so best is to leave it switched off.

Joomla extensions for Caching

For specific purposes, you can install a caching-extension from the Joomla Extension Directory. This can be especially usefull if parts of your site need to be cached, but others not, requiring a per menu item level of caching. Or maybe you need to have different levels of caching per browser, or mobile devices.

An excellent example of such an extension is Jot-Cache.

Like this article?    Share it!