Understanding Global Module Caching in Joomla

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

Enabling caching in Joomla 2.5 is a great way to speed up page load times and reduce server load. While there are several articles already on the web about Joomla 2.5 caching, they fail to provide clarity, and they all generally repeat the same information. In this article, we hope to answer common questions regarding the Global Configuration >> System >> Cache Settings.

**Note: This guide also applies to Joomla 3.

Using Tests to Understand Global Caching

In our testing, we created a simple module called mod_last_cache. This module uses the php time function and prints the current time to the screen. The idea being that if cached content is being served, you will see an older time on the page. If cached content was not being served, you would see the actual time on the page.

We also tested using two different computers. Each unique computer is referred to as User 1 and User 2 in the raw data table listed further below in this article.

RESULTS

After running our tests, we came to the following conclusions:

Unique cache per visitorConservative cache shows all visitors to your site the same exact cached content. Progressive caching however caches the content for each user uniquely.
Toggling module cachingIf you want to toggle caching on/off with individual modules, set the global cache type to Conservative and then use the module’s cache type to enable / disable caching. Progressive caching overrides a specific modules cache settings.
Logged in users and cacheRegardless of conservative vs. progressive caching, logged in users do not see cached module content.
Module cached is based upon the current pageEach module that is cached can have a different cached version for each page. For example, if you had a “related questions” module, a cached version of this will work (it would show a cached version of related articles for each different article).

Raw Results

Items in green represent cached content being shown. Items in red represents non cached content being shown.

Userlogged in?page1 timepage2 timeDebug Enabled?Global CacheModule Cache
1no2/24/2012 14:43:282/24/2012 14:43:48yesconservativeuse global
1no2/24/2012 14:43:282/24/2012 14:43:48yesconservativeuse global
2no2/24/2012 14:43:282/24/2012 14:43:48yesconservativeuse global
2no2/24/2012 14:43:282/24/2012 14:43:48yesconservativeuse global
At this point in our testing, we set the module cache type to no caching.
1no2/24/2012 14:46:052/24/2012 14:46:14yesconservativeno caching
1no2/24/2012 14:46:322/24/2012 14:46:40yesconservativeno caching
2no2/24/2012 14:46:492/24/2012 14:47:00yesconservativeno caching
2no2/24/2012 14:47:092/24/2012 14:47:21yesconservativeno caching
At this point in our testing, we set the global cache type to Progressive caching.
1no2/24/2012 14:47:552/24/2012 14:48:04yesprogressiveno caching
1no2/24/2012 14:47:552/24/2012 14:48:04yesprogressiveno caching
2no2/24/2012 14:48:312/24/2012 14:48:40yesprogressiveno caching
2no2/24/2012 14:48:312/24/2012 14:48:40yesprogressiveno caching
1no2/24/2012 14:47:552/24/2012 14:48:04yesprogressiveno caching
2no2/24/2012 14:48:312/24/2012 14:48:40yesprogressiveno caching
At this point in our testing, we set the global cache type to Conservative caching.
1no2/24/2012 14:50:082/24/2012 14:50:16yesconservativeno caching
1no2/24/2012 14:50:342/24/2012 14:50:46yesconservativeno caching
1no2/24/2012 14:51:052/24/2012 14:51:13yesconservativeno caching
At this point in our testing, we set the module’s cache type to use global settings.
1no2/24/2012 14:51:502/24/2012 15:04:07yesconservativeuse global
1no2/24/2012 14:51:502/24/2012 15:04:07yesconservativeuse global
2no2/24/2012 14:51:502/24/2012 15:04:07yesconservativeuse global
2no2/24/2012 14:51:502/24/2012 15:04:07yesconservativeuse global
At this point in our testing, User 2 is logged into Joomla.
2yes2/24/2012 15:05:252/24/2012 15:05:35yesconservativeuse global
2yes2/24/2012 15:05:452/24/2012 15:05:53yesconservativeuse global
2yes2/24/2012 15:06:052/24/2012 15:06:15yesconservativeuse global
At this point in our testing, we set the global cache type to Progressive caching.
2yes2/24/2012 15:06:522/24/2012 15:07:01yesprogressiveuse global
2yes2/24/2012 15:07:122/24/2012 15:07:20yesprogressiveuse global
At this point in our testing, we enabled the global settings debug feature.
2yes2/24/2012 15:10:142/24/2012 15:10:23noprogressiveuse global
2yes2/24/2012 15:10:342/24/2012 15:10:41noprogressiveuse global
1no2/24/2012 14:51:502/24/2012 15:04:07noprogressiveuse global
1no2/24/2012 14:51:502/24/2012 15:04:07noprogressiveuse global

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X