Support » Requests and Feedback » [Plugin: WP Super Cache] Clear one cache file when a post or page is updated

  • Hi-

    I notice there is an option with wp-super-cache to:

    Clear all cache files when a post or page is published

    What would be infinitely more useful would be an option to:

    Clear appropriate cached file when a post or page is updated

    There’s no need to purge the entire cache just because one page has been updated, but it would be very useful for that page’s cache file to be purged. Couldn’t you hook into edit_post or edit_page hooks and remove the cache for that item using the permalink or something?

    That would be ridiculously rad. Love the plugin, thanks for your hard work!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem with that is how would you get the archives/index/etc pages updated with the new post/page?

    Well, you just have a modifiable set of pages that would be affected by a post/page change:

    index
    archive
    category
    etc.

    The list is finite and pretty static

    sant0sk1 – it already does some of what you describe. Take a look at wp_cache_post_change(). Send me a patch if you come up with more complete code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] Clear one cache file when a post or page is updated’ is closed to new replies.