WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the wp-super-cache page, there is the following sentence, which I do not understand::

Checking for and deleting expired files is expensive, but it’s expensive leaving them there too. On a very busy site you should set the expiry time to 300 seconds.

Let's say that I am using a low expiry time, doesn't that mean that the cache needs to rebuild over and over every 300 seconds?

I mean, most of my content (except for the home page), does not change. So why should I matter if most of the posts will simply stay the same for days?

share|improve this question

closed as off-topic by birgire, gmazzap, ialocin, Rarst Aug 25 '14 at 16:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

It's a great question, and one I've been a little confused by as well. The conclusion I've drawn is, it's expensive to leave cache files for two reasons:

  1. If your site (or sites, in the case of a multisite installation) has/have a lot of pages, you can easily end up with thousands of cache files, which makes finding the right cache file a little slower.
  2. It's easy for updates to be overlooked (e.g. change to a theme file, plugin, widget, etc) and so if you had no garbage collection and required yourself to remember to manually clear the cache, you leave a lot of room for human error.

As the plugin documents, there's no "right value" to put in there. If you rarely make changes to your site, and you don't have thousands of pages, I see no harm in making this value a day or two. Then, at worst, a page is stale for that length of time.

Again, I'm not saying this is the answer, I'm saying this is what I think is the answer. This question is over 6 months old, so if you've found a better answer since asking this, do share!

share|improve this answer

My experience with w3-total-cache has been that a high expiry time is just fine. This is because when a post is updated, it is purged from the cache. So, I can leave the expiry time at a day or more, and it has no negative affect on my site.

We also have several pages that are completely dynamic and are not updated themselves. In those cases (like our home page, in particular), I just have it purge that page from the cache on every update.

This has worked very well for us and helps our load times tremendously.

Here is a parial screenshot of the page cache config:


share|improve this answer
»I just have it purge that page from the cache on every update« programmatically? Could you show the exact how-to? Might be interesting for later readers. Hint: Images are good for upvotes ;) – kaiser Apr 26 '12 at 12:43
Its a default setting of w3-total-cache. – Aaron Wagner Apr 26 '12 at 19:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.