we recently stumbled into the exotic realm of caching our content. It turns out that caching had been disabled from the start (which I understand is unusual for a supported Matrix instalation?).
In any case we've all gotten used to instant page updates. :lol:
Our home page in particular is subject to some rapid-fire changes, and our management are used to seeing these without force-refreshing the browser or suchlike. Since we enabled caching I'm explaining how to CTRL/cmd+R quite a lot. :o
So what I'd like to know is:[/size][/font][font="Georgia"][size="3"]
Can we disable/exclude Matrix caching for the homepage only?
We are tempted to reduce the max-age to one hour (it's currently 24 hours) does any one have any advice?
Can we disable/exclude Matrix caching for the homepage only?
[/size][/font]
[/quote]
Depending on how many people hit your homepage, that could have really horrible results. Not caching your homepage means you have to do DB lookups and have Matrix built that page for EVERY user, which will cause a huge strain on your server. I think the staff just needs to get used to it because caching is necessary, especially on a homepage.
24 hours is a relatively long time. You could still get benefits by caching for a shorter amount of time (for example 1-3 hours). If you have a high traffic site you'll see benefits even with lower cache times as well.
A neat trick is to set your cache time higher than your browser expiry time. If you set your browser expiry time even lower (eg. to 15 minutes / 900 seconds), then you can guarantee that users will see new content within 15 minutes. The content is can still be cached in Matrix for hours, but browsers check back more often to see if there's a newer version.
Don't forget, you can also set up triggers to clear the cache on updated content automatically (but be careful; it's better to restrict the trigger as much as possible to avoid issues clearing too much at once).
After these rapid fire changes you could also do a quick /_recache to make sure matrix clears and repopulates the cache on the homepage. And ditto on Dan's advice, we usually set anywhere from 1 hour to several. 24 hours (matrix default) is overkill for most sites so caching should really be tweaked based on your traffic and size of the site.