Should the page cache be refreshed often? [closed]

In the w3 total cache there is the option to set the time until the cache is flushed (and thus, recreated on the next time a visitor comes by).

My question is, assuming I’ve got a lot of content on my site that doesn’t change almost ever, why would I not just set the caching to stay for days (instead of getting flushed every hour or so)?

Is there a problem with that strategy?

1 Answer
1

The one possibility is caching broken page. For example some database query fails (which is not uncommon in shared environment and/or under load) and some page gets displayed broken / with errors.

Since caching doesn’t assume integrity checking it can cache such page… And your cache interval is days – page is broken as long.

It would work better if mechanism was manual – you explicitly make something static and it remains that way (plenty CMS enginges work completely like that – generate complete static page and serve it). But I am not aware of any WP plugins that implement that.

Leave a Comment