Switch on Caching to give your Joomla website an instant performance boost.

 

Contents[Show]

What is a cache? Wiki says:

A Cache is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch (due to slow access time) or to compute, relative to the cost of reading the cache. In other words, a cache is a temporary storage area where frequently accessed data can be stored for rapid access. Once the data is stored in the cache, future use can be made by accessing the cached copy rather than re-fetching or recomputing the original data, so that the average access time is lower.

What does this mean in terms of Joomla? Instead of hitting your MySql database with same queries over and over again, your data is stored to a local storage (in the Joomla cache directory) and retrieved from there, instead of from the database. This means that your database will perform better, and your website will feel faster, and be able to support more simultaneous users.

Please note, that this is different from browser caching - browser caching is something which is instructed by the web server (but done by the local browser). This is actual caching of the resources and HTML created on the web server. If you want to read more about how to leverage browser caching read this article here.

Of course, the ONLY way you can really improve performance is if you switch to a faster hosting server. Have a look at our InMotion hosting VPS review here.

Joomla 2.5 and Joomla 3

Activating the Cache is straightforward. From the Global Configuration, click on System Tab, and on the right-hand side, there is the Cache Settings section. Click ON - Conservative Caching or ON - Progressive Caching in the Cache Settings, and put a reasonable amount in minutes (60 minutes should be quite good for most websites). Once you press Apply, Caching will be enabled. 

Enable joomla cache

If your Joomla host supports it such as the hosting of CollectiveRay.com - you may also want to enable Memcache to make your Joomla website even faster!

Joomla Memcached: Quickly Give Your Site Insane Speed (Guide)

One of the fixations we've had over the recent past, is a fixation to make our site load insanely fast - and that's when we first heard about Joomla memcache(d).

You've probably seen our "memcache" article, if you haven't then you really should ;) On some of our sites which are on SiteGround we actually enable this because it gives you a nice speed boost.

Let's just say that we have never seen such a great hosting service. By default, the loading site was cut down by an impressive 2 seconds (with no other changes).

That means they set their servers up very very nicely. But there's more to make your site fast - Joomla memcached.


 

Contents[Show]

Besides the default setup, SiteGround offer three levels of cache to make your site faster

Level 1: Static Cache - caches your static content (similar to what a CDN would do)

Level 2: Dynamic Cache - It creates copies of your website's dynamic content and stores them in the server RAM. This requires their own custom plugin to interface well with your site and the server it's hosted on

Level 3: The Joomla Memcached technology speeds up database calls, API calls and page rendering by storing data and objects in memory to reduce the number of times a database is queried. SiteGround is the only company that applies the memcached algorithm on a shared server environment.

How to Activate Joomla Memcached

The great thing is that Joomla supports memcache by default, but since this requires some tweaking, you won't find it under the normal cache settings in the Global Configuration. Joomla 3 memcached settings are hidden and need to be activated by doing a small tweak in the configuration.php file.

 Default Joomla Cache Settings

 

To enable Memcache you'll need to edit your Configuration.php and edit the following two variables:

public $caching = '0';
public $cache_handler = 'file';

to:

public $caching = '2';
public $cache_handler = 'memcache';
public $memcache_server_host = 'localhost';
public $memcache_server_port = 'xxxxxx'

 where xxxxxx is a port specified by your hosting server.

Joomla Memcache settings

Joomla memcache settings

 

 

 

Once this is done, your Joomla is now memcached and you should see another improvement in the loading time of your website. This is particularly helpful for busy websites. Make sure you check whether your site supports memcached - if they don't, you should give SiteGround a look ;)

There are plenty of other articles about performance on this site, one of the more popular ones is how to fix the error named, leverage browser caching - we've got a full explanation on CollectiveRay.

 

Let's help you manage your Joomla better

joomla

Free Joomla tips ebook button

Switch on Joomla caching for a faster joomla website

Point of note:

When enabling the Joomla cache, you may notice that your "Hit Counts" are no longer increasing on each and every hit. Essentially, since you're storing a copy of the content for some time, the Hits will only increase each time the cache expires. Although this might sound like a disadvantage, we believe you should be completely ignoring hit counts regardless of whether you enable the Joomla cache or not. Hit counts are skewed and inaccurate for various reasons

1. They are inflated by your own hits

2. They are inflated by bots, crawlers, and other "unreal" or "ghost" visitors, these are not actual visitors to your sites. They are just scripts doing their robot tasks. Thinking of these as actual people reading your posts will lead to an unrealistic scenario

3. Services such as Google Analytics are much more accurate at handling scripts and creating a detailed analysis and profile of your website visitors. It will do you much more good if you use a script such as Google Analytics for this. You can use our Joomla Google Analytics plugin to do this.

As you can see throughout our site, we've disabled most places where Joomla hits appear, because we believe these are useless, literally a waste of resources. If you want to know who is hitting your site, use Google Analytics. If you want to impress your visitors with the number of page views you've got, add some social buttons. They're much more prone to bring plenty of traffic, and of course, they are actually accurate.

Joomla 1.5

Activating the Joomla Cache is also straightforward. From the Global Configuration, click on System Tab, and on the right-hand side there is the Cache Settings section. Click Yes on Cache Settings, and put a reasonable amount in minutes (60 minutes should be quite good for most websites). Once you press Apply, Caching will be enabled.

Joomla 1.0 

The standard Joomla cache is enabled from Site > Global Configuration > System > Cache Settings (or Site > Global Configuration > Cache tab for Joomla 1.0), and mark it as enabled.

Though there are components written for caching the out of the box caching will give your website an instant boost.

About the Author
David Attard
Author: David AttardWebsite: https://www.linkedin.com/in/dattard/
David has been working in or around the online / digital industry for the last 18 years. He has vast experience in the software and web design industries using WordPress, Joomla and niches surrounding them. As a digital consultant, his focus is on helping businesses get a competitive advantage using a combination of their website and digital platforms available today.

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!

 

 

Get Started Now With ShutterstockShutterstock

Best Rated Caching Plugin

Make your website faster 

How to make your website FAST!

Step-by-step - free email course, how to make your website load in less than 1 second  

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists.

David attard