Better performance with joomla System Cache plugin

This forum is for general questions about extensions for Joomla! version 1.5.x.

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.
Blender
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jun 04, 2008 6:09 pm

Better performance with joomla System Cache plugin

Post by Blender » Fri Sep 19, 2008 10:25 am

I think a lot of joomla users are not aware of the system - cache plugin.
This plugin workst great for most users, it’s not really documented,
in the default installation it’s turned off.
Most users turn on cache in global configuration but this is not the same thing!
So go to the plugin manager and check it out!

User avatar
davetanguay
Joomla! Hero
Joomla! Hero
Posts: 2511
Joined: Fri Sep 22, 2006 6:21 pm
Location: Orlando, FL
Contact:

Re: Better performance with joomla System Cache plugin

Post by davetanguay » Sat Sep 20, 2008 8:11 am

I must admit... browsing around my site after I enabled this, it seems like the pages load 3-4 times faster. Ar there any drawbacks to enabling this? If not why would the default have it turned off?
CPanel Web Hosting Services http://interactiveonline.com/shared-web-hosting
Follow us on Twitter @interactiveo

Blender
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jun 04, 2008 6:09 pm

Re: Better performance with joomla System Cache plugin

Post by Blender » Sat Sep 20, 2008 12:21 pm

It depends on your site.
For example if you use they random image module the page will be cached
and you will not see a different image until the cache expires.
Depends on your Cache Lifetime setting.

If you only update your site once a week, then why not set the Liftime really high?
Why make unnessecary database calls. You could allways clean your cache if needed.
(Tools -> Clean Cache)

conan1212
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Sep 17, 2008 3:30 pm
Location: Vietnam
Contact:

Re: Better performance with joomla System Cache plugin

Post by conan1212 » Sat Sep 20, 2008 5:48 pm

There are some ways to optimization performance for your joomla application.
Optimize html, css, js by using gzip, compress for minimum time to load.
Use ajax to load content don't reload all page.
You should use only useful modules and components.
Of course Cache is the best way to do that. But you should be careful with using caching data on site with multi users, levels. Clear cache when you update, delete, update anything on your site.

In orther case You must use ajax to call dynamic element on site be cause data on this element is out of time.

User avatar
celine2
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Thu Sep 27, 2007 1:05 pm
Location: Toledo, Ohio USA
Contact:

Re: Better performance with joomla System Cache plugin

Post by celine2 » Sat Sep 20, 2008 6:33 pm

Does this apply to both Joomla 1.0 and 1.5?
Still searching for the answers.... www.HarperVance.com

Blender
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jun 04, 2008 6:09 pm

Re: Better performance with joomla System Cache plugin

Post by Blender » Sun Sep 21, 2008 12:35 pm

No Joomla 1.5. There are however commercial extensions doing - sort of - the same thing.
Last edited by Blender on Mon Sep 22, 2008 7:54 am, edited 1 time in total.

User avatar
nhudell
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Tue Oct 03, 2006 6:36 am
Location: Bangkok, Thailand
Contact:

Re: Better performance with joomla System Cache plugin

Post by nhudell » Mon Sep 22, 2008 6:39 am

I have been thinking about turning on caching for a while now, it sounds like a great way to improve performance.

The only thing that holds me back is that I am not sure how Comments will be affected? I use JomComment, will the we comments only be visible after the cache has expired?

Or will new comments re-cache the whole page?

phatrick
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri Dec 14, 2007 10:38 am

Re: Better performance with joomla System Cache plugin

Post by phatrick » Wed Oct 01, 2008 3:19 pm

Blender wrote:No Joomla 1.5. There are however commercial extensions doing - sort of - the same thing.
Sorry this is not clear. Do you mean there is no facility for this in Joomla 1.5? If so why would it have been left out from the older Joomla 1.0?

I looked in the Joomla 1.5 global configuration and you can switch caching on. No plugins however.

phatrick
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri Dec 14, 2007 10:38 am

Re: Better performance with joomla System Cache plugin

Post by phatrick » Wed Oct 01, 2008 4:08 pm

Sorry I did see the System Cache plugin ( Joomla 1.5). So I assume I turn on both the Global Config>>system cache
And the System Cache Plugin


What is the difference between the Global Config>> cache setting and the System Cache Plugin?


Also in the System Cache Plugin, should I enable browser caching?

User avatar
zigzag
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 249
Joined: Tue Sep 20, 2005 9:03 pm
Location: Elsewhere

Re: Better performance with joomla System Cache plugin

Post by zigzag » Tue Oct 21, 2008 2:28 am

Does anyone know if this has any adverse implications with adsense?

User avatar
darb
Joomla! Hero
Joomla! Hero
Posts: 2038
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

Re: Better performance with joomla System Cache plugin

Post by darb » Tue Oct 21, 2008 8:41 am

Well to enhance this more go to http://www.joomlaperformance.com and install the querycache . Read about how to use it there and especially the boost you can have if using J 1.5 native with latest nightly build querycache. Also check the pagecache 2 version.

article man
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Oct 22, 2008 1:18 pm

Re: Better performance with joomla System Cache plugin

Post by article man » Wed Oct 22, 2008 1:41 pm

I was not aware of this cool little function too,seems really snazzy and useful,and its pretty Good,Thanks for introducing it to me,God Bless.

[removed self promotion]
Last edited by Geoff on Fri Mar 06, 2009 1:09 am, edited 1 time in total.
Reason: removed self promotion

User avatar
air jordans
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Sep 30, 2008 1:49 pm
Location: http://www.aol66.com/
Contact:

Re: Better performance with joomla System Cache plugin

Post by air jordans » Thu Oct 30, 2008 3:34 pm

Thank you share, System Cache plugin is very good. :)

cvoogt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 211
Joined: Wed Sep 27, 2006 1:10 am
Location: Sterling, VA, USA
Contact:

Re: Better performance with joomla System Cache plugin

Post by cvoogt » Fri Jan 09, 2009 1:31 am

Too bad System Cache doesn't play nice with logging in.
See this thread: http://forum.joomla.org/viewtopic.php?f=432&t=319565.

I have never been able to use it, because then I get the problem that users will start seeing other user's information. For example, User A logs in and at that point the page gets cached. User B visits the site and doesn't even have a login, but sees "Welcome, User A!". In my case I am using Community Builder's login module, however I have also had this happen with the default Joomla login module. It is a Joomla bug that has so far not been fixed.

I have about a dozen or so Joomla 1.5.8 sites, and none of the ones requiring user logins are using System Cache.

TimJBart
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Sep 28, 2008 10:37 am

Re: Better performance with joomla System Cache plugin

Post by TimJBart » Thu Mar 05, 2009 10:17 am

Out of interest, what is the main difference between the Joomla cache, and the system - cache plugin?

My site relies heavily on the cache plugin, because the joomla cache doesn't seem to speed anything up on my Virtuemart site

User avatar
darb
Joomla! Hero
Joomla! Hero
Posts: 2038
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

Re: Better performance with joomla System Cache plugin

Post by darb » Thu Mar 05, 2009 10:45 am

cvoogt wrote:Too bad System Cache doesn't play nice with logging in.
See this thread: http://forum.joomla.org/viewtopic.php?f=432&t=319565.

I have never been able to use it, because then I get the problem that users will start seeing other user's information. For example, User A logs in and at that point the page gets cached. User B visits the site and doesn't even have a login, but sees "Welcome, User A!". In my case I am using Community Builder's login module, however I have also had this happen with the default Joomla login module. It is a Joomla bug that has so far not been fixed.

I have about a dozen or so Joomla 1.5.8 sites, and none of the ones requiring user logins are using System Cache.
Why dont you update to J 1.5.9 and solve the problem?? Use the autoupdater Joomla Magic its a process of 20 seconds.

cvoogt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 211
Joined: Wed Sep 27, 2006 1:10 am
Location: Sterling, VA, USA
Contact:

Re: Better performance with joomla System Cache plugin

Post by cvoogt » Thu Mar 05, 2009 2:34 pm

I am using Joomla 1.5.9, but that doesn't help. I run into this issue particularly with mod_login, mod_cblogin, and the Virtuemart "my cart" module. It is not the fault of those modules, because even when they are set to not cache, that only affects the global config's cache and not the System Cache. I.e., I could force the template to clean the cache for mod_login on each page load, and it still would not matter because that only cleans the global cache, not the 'page' cache item generated by the System Cache plugin.

As an example, here is what I use to force the RsFormPro component to never cache:

Code: Select all

$cache = &JFactory::getCache('com_rsform');
$cache->clean();
That way the "thank you" message (after submitting a form) won't get cached. Works great, but only with the global cache turned on ... the system cache will still cache the "thank you" page so that other users can potentially see other user's personal information (which gets shown in the form of "thank you, john doe. Here is what you submitted: etc.".)

The system cache plugin really improves performance but I can't use it on most of my sites due to conflicts like I described above.

dude_7526
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 25, 2009 8:50 pm

Re: Better performance with joomla System Cache plugin

Post by dude_7526 » Tue Mar 10, 2009 3:45 pm

cvoogt wrote:I am using Joomla 1.5.9, but that doesn't help. I run into this issue particularly with mod_login, mod_cblogin, and the Virtuemart "my cart" module. It is not the fault of those modules, because even when they are set to not cache, that only affects the global config's cache and not the System Cache. I.e., I could force the template to clean the cache for mod_login on each page load, and it still would not matter because that only cleans the global cache, not the 'page' cache item generated by the System Cache plugin.

As an example, here is what I use to force the RsFormPro component to never cache:

Code: Select all

$cache = &JFactory::getCache('com_rsform');
$cache->clean();
That way the "thank you" message (after submitting a form) won't get cached. Works great, but only with the global cache turned on ... the system cache will still cache the "thank you" page so that other users can potentially see other user's personal information (which gets shown in the form of "thank you, john doe. Here is what you submitted: etc.".)

The system cache plugin really improves performance but I can't use it on most of my sites due to conflicts like I described above.
Hello all

I am having this problem too as "cvoogt" mentioned... System Cache does seem to make site faster but creating heck of problems in form submission screens.

Ex: When a user click on Forgot user screen, and type incorrect email, there is no message indicating that email is incorrect. But when I turn off the system cache plugin, message does appear.

This problem happens on all forms submissions, I use RSForm and see this problem there too.

Greately appreciate if anyone has a solution to correct this problem, or suggest any other caching mechanism that does not have this problem but improves the sites performance


I am on Godaddy shared hosting with Joomla 1.5.9

Thanks much inadvance

cvoogt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 211
Joined: Wed Sep 27, 2006 1:10 am
Location: Sterling, VA, USA
Contact:

Re: Better performance with joomla System Cache plugin

Post by cvoogt » Tue Mar 10, 2009 5:23 pm

Have you tried my solution?
Try adding this code into your template's index.php file:

Code: Select all

$cache = &JFactory::getCache('com_rsform');
$cache->clean();
That actually works for me with both the global cache and system cache turned on.
Otherwise you could do this:

Code: Select all

if($_REQUEST['option'] == 'com_rsform'){
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
That way the system cache would be cleaned too every time someone access the RsForm component.
Seems like overkill but might work. I have not tried it but it should work - please report back if this works for you.

dude_7526
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Feb 25, 2009 8:50 pm

Re: Better performance with joomla System Cache plugin

Post by dude_7526 » Tue Mar 10, 2009 6:17 pm

cvoogt wrote:Have you tried my solution?
Try adding this code into your template's index.php file:

Code: Select all

$cache = &JFactory::getCache('com_rsform');
$cache->clean();
That actually works for me with both the global cache and system cache turned on.
Otherwise you could do this:

Code: Select all

if($_REQUEST['option'] == 'com_rsform'){
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
That way the system cache would be cleaned too every time someone access the RsForm component.
Seems like overkill but might work. I have not tried it but it should work - please report back if this works for you.
cvoogt,

Thanks for your response, I tried this and does seem to work for RSForm, and I tried the same code for com_user (with code below) in index.php, but no luck. Not sure where else problem is.

Code: Select all

if($_REQUEST['option'] == 'com_user'){
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
However, as you said this could be over kill since it cleans up the entire page cache whenever the component is accessed, due to which things might slow down again.

Please suggest if you have any other thoughts. Again I really appreciate your help

cvoogt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 211
Joined: Wed Sep 27, 2006 1:10 am
Location: Sterling, VA, USA
Contact:

Re: Better performance with joomla System Cache plugin

Post by cvoogt » Tue Mar 10, 2009 6:59 pm

Hi dude_7526,
I have not experienced or noticed this issue with com_user. I would suggest doing a test with just global config on, then clean the cache using Tools > Clean Cache, then try your form in Firefox. Once you get the results screen where it is supposed to show some error message, try accessing that same form using Internet Explorer, and see if Joomla has cached anything. Also check the cache using Tools > Clean Cache - see if it has cached com_user at all. If so, the code I used for RsForm should work for com_user, at least for global config.

Once that is working for global config, try the same test with only the system cache plugin turned on. Try it with the browser-caching turned on first. Turn off the global cache. Clean the cache. Try the form again in both browsers. See what Joomla has cached at Tools > Clean Cache. It should be 'page'.

Lastly,
take another look at the code

Code: Select all

if($_REQUEST['option'] == 'com_user'){
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
Maybe it should be more like this:

Code: Select all

if($_REQUEST['view'] == 'theview'){
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
Obviously 'theview' needs to be whatever the view in question is. This way you could clean the cache on only certain views of a component. It is useful to have SEF turned off during this testing, so you can see the "&view=theview" in the URL.
So on the login screen you could use this, for example;

Code: Select all

if($_REQUEST['view'] == 'login'){
$cache = &JFactory::getCache('com_user');
$cache->clean();
$cachepage = &JFactory::getCache('page');
$cachepage->clean();
}
That way you're not cleaning the cache *all* the time. Question is ... will this even work for you?

I test the two caching systems one at a time and only when both work do I turn them both on.

Casper

User avatar
theralph
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Jul 16, 2009 9:31 pm
Contact:

Re: Better performance with joomla System Cache plugin

Post by theralph » Sat Aug 01, 2009 2:57 pm

I have been following this interesting thread and have a question on a related issue.

When I enable the System Cache plugin it causes the navigation to certain pages to get quirky.

For instance, if you go to this link:

http://wrmea.org/archives.html

and click on the "1988-1993" link and then click on the "1991 November" link everything works fine with the System Cache plugin DISABLED. The link goes to the correct page, which is this page:

http://wrmea.org/component/content/cate ... ember.html

As soon as I enable the plugin, it causes the "1991 November" link to go to this page:

http://wrmea.org/archives/135-1991-november.html

It seems to be taking out the "/component/content/category/" section and replacing it with "/archives/"

I have the plugin currently DISABLED so everything is working but if you would like me to turn it on so you can see what I am talking about I would be more than happy to oblige.

Regards,
Ralph

Thailender
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Sep 02, 2009 6:59 pm

Re: Better performance with joomla System Cache plugin

Post by Thailender » Wed Sep 02, 2009 7:56 pm

@cvoogt
Hey dude your solution worked just fine for me.
You saved me a lot of time

thaks
Rudolf

User avatar
gubagy
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Sun May 17, 2009 12:57 pm
Location: The Netherlands

Re: Better performance with joomla System Cache plugin

Post by gubagy » Fri Oct 23, 2009 4:59 pm

darb wrote:Well to enhance this more go to http://www.joomlaperformance.com and install the querycache . Read about how to use it there and especially the boost you can have if using J 1.5 native with latest nightly build querycache. Also check the pagecache 2 version.
I followed the whole discussion and I still dont get it ??? ...

What is the difference between joomla System Cache and global cache ?
Is there anyone who could make it more clear

Thanks in advance


Cheerz,

Guby
Learning is not mandatory...
Surviving also not !

myPhone
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Thu Jul 30, 2009 5:33 am

Re: Better performance with joomla System Cache plugin

Post by myPhone » Sat Oct 24, 2009 2:44 am

gubagy wrote:
darb wrote:Well to enhance this more go to http://www.joomlaperformance.com and install the querycache . Read about how to use it there and especially the boost you can have if using J 1.5 native with latest nightly build querycache. Also check the pagecache 2 version.
I followed the whole discussion and I still dont get it ??? ...

What is the difference between joomla System Cache and global cache ?
Is there anyone who could make it more clear

Thanks in advance


Cheerz,

Guby
Here you go, I found this today when I was wondering the exact same thing: Joomla caching explained


Now I'm having some strange problems when I enable Joomla system cache. It significantly speeds up my page loading times, but for some reason, my template CSS randomly fails to load, causing only text to be displayed. I've check this on several computers and my iPhone, so I know it's not a "local" caching problem. Any ideas?

http://www.wakinglifephoto.com/

TIA!

myPhone
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Thu Jul 30, 2009 5:33 am

Re: Better performance with joomla System Cache plugin

Post by myPhone » Sat Oct 24, 2009 4:59 pm

Here you go, I found this today when I was wondering the exact same thing: Joomla caching explained


Now I'm having some strange problems when I enable Joomla system cache. It significantly speeds up my page loading times, but for some reason, my template CSS randomly fails to load, causing only text to be displayed. I've check this on several computers and my iPhone, so I know it's not a "local" caching problem. Any ideas?

http://www.wakinglifephoto.com/

TIA!

I just wanted to follow up to say I figured it out with the help of another forum member. Basically, the leading "/" wasn't showing up when a page was generated, which broke my CSS and images. If anyone else has this problem, the solution is was very simple. Go to your plugin manager and move "System - SEF" to the #1 position.

If you need more info, here's a link to the thread I found: http://forum.joomla.org/viewtopic.php?p ... 4#p1328774

mazeem
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Aug 18, 2009 5:00 am

Re: Better performance with joomla System Cache plugin

Post by mazeem » Fri Oct 30, 2009 8:21 am

I was taking an exam on Joomla and there was a question regarding cache,

With cache enabled, the content will be cached based on the:

a. Request URI
b. Cookie
c. Browser
d. Session

One of these options is supposed to be true as there were radios with the options.
Can any one tell which one is correct?

sandyrochard123
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Oct 30, 2009 12:19 pm

Re: Better performance with joomla System Cache plugin

Post by sandyrochard123 » Fri Oct 30, 2009 12:27 pm

Hi Blender,
I am Sandy thanks your advice actually i am also facing the problem like that in jhoomla its become headache of me.I try out his solution if its works than definitely i will share these with others i will so much thankful to you if problem is solved if you any other idea regarding the jhoomla please post me.

User avatar
jalil
Joomla! Guru
Joomla! Guru
Posts: 925
Joined: Wed Jul 04, 2007 4:54 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Better performance with joomla System Cache plugin

Post by jalil » Sun Nov 01, 2009 7:36 am

i did get better performance with Joomla Global Cache, but it introduced an error which cannot be tolerted. Submenus do not open up any longer, rendering the caching useless.
(Joomla 1.5.9.)

So if you are out to get better performance, watch out. Have not tried the plugin cache, but i don't feel i want to try any more Joomla caching as it seems to me dynamic contents were to considered in the caching design, so its best not used at all.

Disabling cache in dynamic parts will work of course, and using the cache cleaning codes, but i don't fancy the idea of wandering throughout the entire site deciding which parts should be cached and which should not, and adding codes to templates in a multi template site. It is all just too messy, and quite silly too.

User avatar
rvbgnu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 197
Joined: Mon Sep 28, 2009 3:38 pm
Location: Conamara Gaeltacht, Éire
Contact:

Re: Better performance with joomla System Cache plugin

Post by rvbgnu » Thu Nov 26, 2009 7:58 pm

Hi all,
I follow this thread, very interesting indeed!

With Joomla! v1.5.15 (and 1.5.14 apparently), the Global Cache (in Site > Global Configuration > System works great. BUT you must disable it on some modules to avoid problems, like for the sub-menus issue mentioned above: go to Extension > Module Manager > select the type filter on mod_mainmenu, edit each menu and turn Advanced Parameters > Caching = No caching.
You could have more modules to set up with no caching, the ones which use dynamic content or refresh often but once it's done, it will really reduce your server load.

And when you update your website, you can delete the cache to show your updates immediately (depending of the user and its browser cache settings) Tools > Clean cache > select all and press Delete.
Best Regards, Hervé Boinnard
Joomla! multilingual website and online business made easy - https://www.puma-it.ie
Joomla Irish Translation Team: https://crowdin.com/project/joomla-cms/ga-IE#
Twitter: @Puma_IT


Locked

Return to “Extensions for Joomla! 1.5”