Lets talk about the Joomla Cache

Discussion regarding Joomla! 2.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Lets talk about the Joomla Cache

Post by wernejo » Fri Jun 15, 2012 5:11 am

OK guys i think its time we talked about a very grey area that should be rather black and white. so lets talk about the Joomla Cache because i believe that after doing much digging around and research, there hasn't been much concrete documentation or guide lines on how to make the Joomla Cache work for you and what settings someone should use.

the reason why i am starting this thread is because most people don't know about the five different types of Joomla Cache's. the other reason is that there isnt much documentation on this subject since version 1.5 and its time for an update.


the first two and more common Cache's joomla has is built into its global configuration with the options of Conservative caching and progressive caching. personal, i don't know much about these two settings but that's the idea of the thread.

the other cache is a plugin that by default is unpublished. this cache is apparently more powerful than the other caches but this cache has the option of using the browsers cache rather than the systems cache. this is one thing i also want to discuss is when you should make the dissension about making the user responsible of how fast the site loads for them.

the 5th cache type is the 3rd party ones you can install rather than using what you already have. are the other cache plugins better than what is already part of the joomla system?

what do you think about the joomla cache? dose it work well enough on your site or are you unsure of how to use it?

User avatar
MrCodexCY
Joomla! Guru
Joomla! Guru
Posts: 510
Joined: Wed Nov 03, 2010 7:35 pm
Location: Limassol, CY
Contact:

Re: Lets talk about the Joomla Cache

Post by MrCodexCY » Fri Jun 15, 2012 6:11 am

Well, right on time! I was working on Joomla! 2.5 this morning. Not only cache but gzip compression also! ;) Well about the cache, i am half happy, because on speed tests it does half the job. It doesn't set a leverage browser cache, and it was required to add coding into .htaccess to fix that, which wasn't the best thing. Regarding the plugin cache, i haven't used it yet, only used the one from the Global Configuration, and actually on progressive caching. Now about if it's good to let the user be responsible for the loading speed of the site, i really don't believe that this is something wrong, as they are the one that want the fast browsing right? ;) But as a professional i would prefer to let the system cache than browsers cache.

~Artemis
Providing quality web design services since 2005!

Get direct Joomla! assistance, contact me on skype: mrcodexcy

User avatar
MrCodexCY
Joomla! Guru
Joomla! Guru
Posts: 510
Joined: Wed Nov 03, 2010 7:35 pm
Location: Limassol, CY
Contact:

Re: Lets talk about the Joomla Cache

Post by MrCodexCY » Fri Jun 15, 2012 6:14 am

~Edit:

About the gzip compression, i was not satisfied from it, because it doesn't compress all css and js files, which i think there should be a feature to enable compression on every single file that loads on the page, not just Joomla! core files, and i was required to install a 3rd party plugin to do the job.
Providing quality web design services since 2005!

Get direct Joomla! assistance, contact me on skype: mrcodexcy

flashgordonweb
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Sat Mar 29, 2008 3:52 pm

Re: Lets talk about the Joomla Cache

Post by flashgordonweb » Sat Jun 16, 2012 9:28 pm

I would love to learn more about the different cache options, so thanks for this thread. I currently don't have any of the cache options on, only using a third-party cache (JCH-Optimize). I have 15,000 articles, and when it was in 1.5 and cache was on, I was having lots of trouble. The cache folder was huge, and Joomla never cleared it - had to be manually cleared. So, my basic questions are what the different cache options do, and if they renew or clean themselves up. That is, if I turn one on, will it erase old cache files on its own, or do I have to do that. My speed is OK with JCH-Optimize, but I would always be interested in improving it.

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Sun Jun 17, 2012 2:57 pm

Yea, let's clear this cache up. I had a really bad performing website and have turned my attention toward the cache to help out and I'm using every cache tool I can. I'm not sure of how well each works on it's own or how to integrate them. I'm also not sure of the best tools to measure that. I think I'm just as confused by the various tools that measure website performance and the suggestions they offer. I've been looking at these:

http://www.webpagetest.org/
http://tools.pingdom.com/
http://gtmetrix.com/
http://www.websiteoptimization.com/services/analyze/
http://site-perf.com/
https://developers.google.com/speed/pagespeed/insights
http://loadimpact.com/page-analyzer

I've been testing various sites on this and, of course, I get various results. So I'm thinking that I need a "standard" Joomla install to use for testing. Keep my testing site fixed and vary the cache config. I'd be happy to set that up for us to work with.

The other thing I've come to realize is that I need to understand each of the 5 cache systems wernejo refers to or I'll never know what the best practice is on this subject. Maybe the Global Config is the place to start?
Next Generation Solutions | http://www.nxgnsol.com

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Sun Jun 17, 2012 6:24 pm

AFAIK, these are the docs for the Global Config setting for cache:

http://docs.joomla.org/Global_configura ... 0.9D_Group

There's three settings and one "Cache Handler" has only one choice and that is "File". So there's really only two items to config and they are "Cache" and "Cache Time". So what's the difference between "Conservative" and "Progressive" settings?

Is there any reason to change the "Cache Time"?
Next Generation Solutions | http://www.nxgnsol.com

flashgordonweb
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Sat Mar 29, 2008 3:52 pm

Re: Lets talk about the Joomla Cache

Post by flashgordonweb » Mon Jun 18, 2012 11:45 pm

I turned on the Global Cache with "conservative" selected. I also turned on some of the Cache options under individual modules, which simply allows one to use the global configuration. Not much difference in my speed or grades according to gtmetrix site. I left my cache time at 900. I also have Gzip on. The biggest difference I've found is in using JCH-Optimize, which helped a lot. A lot of the things I get bad grades for are things I can't fix. If I bundle certain javascripts then parts of the site break.

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Tue Jun 19, 2012 12:35 am

Some of my sites have broken depending on the settings. I have sites on 2 different hosts and for both in the cPanel under the Software/Services panel there is "Optimize Website". Here I selected "Compress all content". I've learned that what this does is it gzips the content on the server as it sends it out. This made an immediate difference. You can use this utility to test:

http://www.port80software.com/support/p80tools.asp

(thanks to the admins at Rochen for this tip.)

I've also set the Joomla Global System config to "Progressive caching" and the Server config to gzip.

To "Leverage Browser Caching" I added this code to my htaccess file:

Code: Select all

<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Cache-control
Header set Expires "access plus 1 month"
</FilesMatch>
The above seems to work with every site and has gotten good results. Now I'm trying to learn how to config JCH_Optimize for the best performance on each site.
Next Generation Solutions | http://www.nxgnsol.com

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Wed Jun 20, 2012 5:48 am

in the past i have used combinations of the different system caches but even though the site was a lot faster, the website i had the settings on was a sports news website that had lots of articles to load. on one side the site was much faster, on the other hand the site would take forever to update. even using short cache intervals, the site would take a while to load new content. this was a huge problem when updating url links within the articles because the pdf that we had the link to would change but not the icon that was used for the link.

the other problem with using a cache is when i build websites for clients because the clients will make changes and they wont appear for a little while. sometimes im not even sure if i should use a cache. :(

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Wed Jun 20, 2012 6:17 am

one thing i have just noticed when using a progressive cache is that not only has the website sped up but also the back end of the website has sped up faster but still have a problem with loading JCE sometimes. would this be effected by the cache?

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Wed Jun 20, 2012 11:41 am

If you have content that needs immediate updating then caching is an issue. If you have news items in a module then you can set the module to no cache under advance options. Modules can have their cache set individually.

I'd like to find the easiest way to turn cache off during development. Or flush cache after some updates are made. Or a combination of the two. Not sure what the best is for me as developer and the users/visitors.
Next Generation Solutions | http://www.nxgnsol.com

User avatar
MoonfireArt
Joomla! Explorer
Joomla! Explorer
Posts: 466
Joined: Wed Feb 29, 2012 3:27 pm

Re: Lets talk about the Joomla Cache

Post by MoonfireArt » Wed Jun 20, 2012 2:20 pm

Easiest way I found was the Cache Cleaner extension by NoNumber. It adds a button to do this in the upper right of every admin screen
The burned hand teaches best... - The Two Towers

http://webdesign.moonfireartstudios.com Joomla web design for small businesses

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Thu Jun 21, 2012 12:56 am

MoonfireArt wrote:Easiest way I found was the Cache Cleaner extension by NoNumber. It adds a button to do this in the upper right of every admin screen
i believe i have used that plugin on one of my websites, its very handy. sure it cleans out the cache at any point you are in the admin side of the website but regardless of how handy it is, if your cache settings aren't set up correctly then the cache cleaner will take a minute or two to delete the cache.

i do recommend using it but if your website has people doing changes to the front end of the website then it could be a problem.

User avatar
MoonfireArt
Joomla! Explorer
Joomla! Explorer
Posts: 466
Joined: Wed Feb 29, 2012 3:27 pm

Re: Lets talk about the Joomla Cache

Post by MoonfireArt » Thu Jun 21, 2012 1:46 am

Wow, most I've ever had it take was a few seconds, but I can see where it could take a while, as in your given example.
The burned hand teaches best... - The Two Towers

http://webdesign.moonfireartstudios.com Joomla web design for small businesses

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Thu Jun 21, 2012 5:59 am

well most people would think that the cache only speeds up the website. what they dont know is how the cache works or why it works. all they think is the higher they set the lifetime of the cache the faster their site will load. if someone dose set a really cache lifespan then when they try to update their site, they're going to have a few problems even with an extension such as Cache Cleaner.

the problem isn't that we don't know how to use the cache, its people who are only starting out in running a website. but if we can gain more knowledge here from the experience of each other then we can better educate others who truly have know clue.

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Thu Jun 21, 2012 3:50 pm

Thanks for the tip on Cache Cleaner, I'll try it.

Is there a browser that is easy to work with that will either turn it's caching off and/or check the server on every refresh for updated cache files? I remember an older version of IE that was good at that. It looks like Opera can be set to check the server every time for updated cache.

The problem I'm trying to solve is a client is updating content and I've got their cache tweaked for better performance but now that's not such a good thing. They can't see their changes.
Next Generation Solutions | http://www.nxgnsol.com

User avatar
MoonfireArt
Joomla! Explorer
Joomla! Explorer
Posts: 466
Joined: Wed Feb 29, 2012 3:27 pm

Re: Lets talk about the Joomla Cache

Post by MoonfireArt » Thu Jun 21, 2012 3:54 pm

The web developer Toolbar extension for Firefox has an option to disable caching. Turn that option on, and it will load fresh every time. Slows down page loads a little, but will stop the annoying browser caching.
The burned hand teaches best... - The Two Towers

http://webdesign.moonfireartstudios.com Joomla web design for small businesses

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Thu Jun 21, 2012 5:23 pm

Good idea but...I don't get a checkmark next to that selection in that menu. It doesn't toggle when selected thus there's no indication if it is either on or off. All the other menu choices work fine. But for Disable Cache, nothing. The only way I can assume that it is invoked is if I go to FF Advanced Network preferences the "Cached Web Content" section toggles between showing the size of the current cache or nothing at all.

I wonder if selecting the checkbox to "Override automatic cache management" and setting it to 0 would do the trick?
Next Generation Solutions | http://www.nxgnsol.com

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Thu Jun 21, 2012 5:26 pm

My point on that last comment would be that that lack of proper functioning would be a problem for a user.
Next Generation Solutions | http://www.nxgnsol.com

User avatar
MoonfireArt
Joomla! Explorer
Joomla! Explorer
Posts: 466
Joined: Wed Feb 29, 2012 3:27 pm

Re: Lets talk about the Joomla Cache

Post by MoonfireArt » Thu Jun 21, 2012 5:29 pm

I just checked mine. By clicking on it, the disable Cache did show a checkmark. I wonder why yours is not acting right?
The burned hand teaches best... - The Two Towers

http://webdesign.moonfireartstudios.com Joomla web design for small businesses

User avatar
duanemitchell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Wed Jan 03, 2007 3:16 am
Location: Boston, MA USA
Contact:

Re: Lets talk about the Joomla Cache

Post by duanemitchell » Thu Jun 21, 2012 6:12 pm

Good question. Can't get that checkmark to show. Oh well, that's another subject.
Next Generation Solutions | http://www.nxgnsol.com

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Mon Jul 02, 2012 7:06 am

duanemitchell wrote: Is there a browser that is easy to work with that will either turn it's caching off and/or check the server on every refresh for updated cache files?
there are lots of different add-ons for Firefox and the other browsers but you need to remember something very important.... these add-ons don't make the site faster for everyone, they only make it faster for you!

the most important thing with any website is making sure it works ok for everyone. this is why its important to test out the way cache in different browsers. normally the cache would be the same for all browsers but if you are using some kind of browser based add-on, then try testing the site in another browser.

the other reason for doing this test is because joomla also has an option for using the browsers cache rather than using the servers cache

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Tue Jul 03, 2012 4:10 am

dose anyone know what is considered a large joomla site these days? one of the system cache options depend on how big your website is. dose this regard how many pages or extensions you have? or could it regard how many files get cached in a lifetime? or is it calculated by the physical file size of the whole website?

djaris45
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Tue Mar 23, 2010 8:39 pm

Re: Lets talk about the Joomla Cache

Post by djaris45 » Thu Jul 05, 2012 12:13 am

I have been developing components etc for a few years now and want to add a few things that may be relevant to the conversation.

I looked into it a bit and I can't find anything in the base coding for the progressive/conservative option, nor do i see any difference in behavior, i think it may be used in a specific handler. There are multiple options in the cache handlers folder, each with a test function. If your hosting supports that handler, it shows as an option in the config area. Each handler has it's own method for storing and retrieving the data.

The Joomla Cache ROCKS, hands down, even if you only make the cache lifetime a few minutes.

Biggest benefit: HUGE reduction in queries posted. put a site into debug and see what your posted queries are with and without caching.
I've developed apps where i had 40+ queries on the heaviest load and was able to drop it down to less than 10 including ACL.
Properly coded components should work seamlessly with the caching system, it can be done ;)

exoduser
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Sat Feb 11, 2012 1:27 am

Re: Lets talk about the Joomla Cache

Post by exoduser » Mon Jul 09, 2012 12:27 am

I have posted here http://forum.joomla.org/viewtopic.php?f=616&t=705719 asking how long the Cache Plugin keep the the browser cache.

As far as I know, the Cache Plugin "Use Browser Caching" seems to be not related to the Global Configuration Cache setting, and even though I clear the cache in Joomla backend, the browser cache are still alive until the user clear their browser cache manually.

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Thu Jul 19, 2012 4:48 am

exoduser wrote:I have posted here http://forum.joomla.org/viewtopic.php?f=616&t=705719 asking how long the Cache Plugin keep the the browser cache.

As far as I know, the Cache Plugin "Use Browser Caching" seems to be not related to the Global Configuration Cache setting, and even though I clear the cache in Joomla backend, the browser cache are still alive until the user clear their browser cache manually.
so i guess that means that using the browser cache is a bad idea then. if that option requires people to manually refresh their cache, how many people will even know what a cache is an how to refresh it?

when it comes to website performance, i believe that it is up to us the web designers and developers to be in charge of how well a website runs. the only exception to this rule is when people use older browsers or IE.

it should not be the responsibility of the user to make the website work but rather the admin who should always make sure that what one person sees is the same as what everyone else see (with the exception of those poor people who think that IE is a good idea)

so we should not use that option because we cant depend on users to know how to refresh their cache. otherwise they will think that the website never updates.

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Thu Aug 23, 2012 11:57 pm

Hi guys,

just as test on a website i've just uploaded yesterday i will be running a conservative cache and also use the cache plugin.

my reason for doing this is that this is the biggest 2.5.6 joomla site i have built to date. the site map has 121 pages / links indexed. the site is also still having new content added to the pages that are already set up.

because of its size, i am using this as an opportunity to test the functions of the conservative cache. if the website dose not get any faster or better then i will change the settings.

i am not using any 3rd part extensions for the cache and only using the default settings.

has anyone ever used these settings before? it would be good to compare results with other websites.

User avatar
wernejo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Sun Jun 17, 2007 9:17 am
Location: Australia
Contact:

Re: Lets talk about the Joomla Cache

Post by wernejo » Wed Sep 26, 2012 4:42 am

ok, its now been a month or two and the website has been running alright but not as fast as i have liked. i have now changed the cache settings to conservative and the lifetime to 2min. hopefully this will make the site faster but also easier to update.

JerryF
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Oct 01, 2012 11:23 am

Re: Lets talk about the Joomla Cache

Post by JerryF » Mon Oct 01, 2012 1:51 pm

What about Memcache(d)?

I'm playing around with it, seems to help in some sort but if you have ~10k articles in your database there's no caching that could help in combination with Joomla 2.5 xD

flashgordonweb
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Sat Mar 29, 2008 3:52 pm

Re: Lets talk about the Joomla Cache

Post by flashgordonweb » Mon Oct 01, 2012 11:00 pm

I run a Joomla site with 15,000 articles and use cache. It has really helped to speed up the site. Here are my settings:

Joomla 2.5.7
Global Config: Cache ON Conservative (Cache time = 15)

Plug-in: JCH Optimize with the following settings -
Combine CSS = yes
Replace @import = no
Combine javascript = no
GZip javascript and CSS = no
Minify Css = yes
Minify Javascript = yes
Minify HTML = yes
Defer javascript = yes
Position combined javascript = bottom of page
Lifetime = 30

Every once in awhile I get an error after saving a new article (I can't remember what it is exactly), but I just go into Maintenance > Purge Expired Cache and that fixes it.

I also have GZip Page Compression turned ON (In Global Config.)

Site is hosted on a VPS and loads in under 5 seconds. Articles load instantly, but menus take under 5 seconds because of the query. I can't combine my javascript and CSS because I use Google Maps on the site, which breaks when you combine the two.

Of course, if you use a big template or have tons of modules/extensions on your site, that will slow it down no matter how much caching you do.


Locked

Return to “Performance - Joomla! 2.5”