Cache life should be 36 hours, but it isn't

Discussion regarding Joomla! 3.x 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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
FilipHradil
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Jun 21, 2014 6:48 pm

Cache life should be 36 hours, but it isn't

Post by FilipHradil » Tue Jun 21, 2016 6:31 am

Hello,

I set up conservative caching with time 2160 minutes.


If is cache created, loading page take about 2 seconds instead of 5. But always after few hours all cache file are probably lost, because loading time take is again 5 seconds.


I always test it on tools.pingdom.com, and when is there existing cache, page starts to load immediately, if not, it take 3 seconds to start downloading site.


Do you any any advice?

Filip

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: Cache life should be 36 hours, but it isn't

Post by itoctopus » Tue Jun 21, 2016 12:55 pm

I believe the issue is caused by your template's caching, and not by Joomla caching. Many templates have their own caching system which can only be turned on or off (and can only be cleared from within the template's settings), and it is indifferent to the global cache settings. I think what is happening is that in a few hours, the template cache is expiring and it is being re-created.

I really wish the day would come where template creators would use the built-in cache rather using their own caching mechanism, but I think they're just trying to avoid CSS/JS conflicts.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

csthomas
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Tue Jun 21, 2016 10:07 pm

Re: Cache life should be 36 hours, but it isn't

Post by csthomas » Tue Jun 21, 2016 10:15 pm

Note that if you change articles or modules then related cache is deleted.
What cache handler do you use? Ex: file/memcache/memcached/redis

FilipHradil
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Jun 21, 2014 6:48 pm

Re: Cache life should be 36 hours, but it isn't

Post by FilipHradil » Wed Jun 29, 2016 7:07 pm

Thank you guys!

1. I will ask creator of my template about it

2. It is even if I am not making anything :/ About cache handler I don't know. I have in settings: Cache handler: File.
Is that it??


Thank you.
F.

csthomas
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Tue Jun 21, 2016 10:07 pm

Re: Cache life should be 36 hours, but it isn't

Post by csthomas » Thu Jun 30, 2016 5:02 pm

Yes.

So you use File cache handler.

If you have more options like redis you may want to try a new handler redis.

[Memcache does not work on php7]
I personally use Memcache (without letter D at the end) with extra optimisation patch from PR 10565:
https://raw.githubusercontent.com/cstho ... mcache.php

For now the patch has not been merged yet with Joomla 3. Test at your own risk.



My advice:

1) File cache (and others) should be clear every some period of time, ex every each one hour.

To do this you have to add your script from "[your_joomla_dir]/cli/garbagecron.php" to task scheduler (cron).
a) you can set it up in ex. cpanel cron jobs.
b) or you may ask your server support team to set your script to run every hour.

This way every hour old/expired files will be deleted.


Locked

Return to “Performance - Joomla! 3.x”