Page cache for categories not updating with W3 Total Cache

I noticed recently that the full page cache for category pages isn’t getting updated. Other pages seem to work fine (home, posts, etc) but categories cache files stay untouched for days until I manually rm -rf them.

What could cause this?

Read More

Plugin updated to latest version.

Related posts

Leave a Reply

3 comments

  1. There are two ‘expires’ setting you can configure in W3 Total Cache, one is the static page cache on your server, the other is the browser cache settings that the browser will use to decide whether to use a local cache for a page, or to re-request that page from the server.

    1. W3 TC should be invalidating the index, category and tags pages on the server cache when you insert or update a new post. If your archive pages are not automatically generated through the ‘normal’ wordpress url rewriting — if, for instance, you have archives that actually live in a custom page-template, W2 TC may not recognize that page as a category archive page, and may not automatically invalidate it. In this case you can look at adding a post-save action to force-invalidate specific pages. From the FAQ:

      How can I flush the cache without using the WP Admin interface?
      It’s possible to empty the entire cache or simply purge the cache of a single post / page:
      Purge the entire page cache: if (function_exists(‘w3tc_pgcache_flush’)) { w3tc_pgcache_flush(); }
      Purge a single post / page by passing it’s ID:
      if (function_exists(‘w3tc_pgcache_flush_post’)) { w3tc_pgcache_flush_post($post_id); }

    2. Frequently the behavior you describe is the result of the browser respecting the expires tag in the headers as the page is served. Even though the server side cache was invalidated, the browser doesn’t actually request a new page, but uses its locally cached version, based on the http headers for the URL. The solution, in this case, is to reduce the time to expires for the browser cache.

      You can control the length of this on the browser tab of the admin settings panel for W3 TC.

  2. I also had a problem with category page cache refusing to be cleared, even after manually clearing it in W3TC.

    My solution was to click Browser Cache, then check “Prevent caching of objects after settings change” and then click “Deploy” at top.

    I think this fixed it but it could also be that the time-to-expire was reached while I was performing that action. I can’t be sure.

  3. I found that my wordpress user wasn’t able to delete the cache files…
    I had to manually chmod the permissions to 777 on the files first.