How often is the cache cleared?
In this article
When does WP Rocket clear the cache?
The most common triggers for full or partial cache deletion are:
- Cache lifespan:
The whole cache will be deleted automatically according to the time period you specify in the Basic settings tab.
- New content:
When you publish new content or update/edit existing content, the cache for that post/page as well as related content (e.g. taxonomy archives) will be cleared and (if your settings allow) preloaded.
Full cache deletion
These WordPress actions trigger full cache deletion:
- changing themes
- creating/updating/deleting users (if you run a busy e-commerce site with a lot of orders, those orders could be creating new users and therefore causing frequent cache deletion)
- updating navigational menus
- updating theme options
- creating/updating/deleting sidebar widgets
- creating/updating/deleting categories, tags, or permalink structures
- creating/updating/deleting terms
- creating/updating/deleting links (the post type “Link” that was removed from WorPress core in version 3.5, but may still be used via a plugin)
- when any options are saved in the Customizer
- when the Avada theme clears its own cache
Developers, you might want to look here for which WordPress actions WP Rocket hooks into for cache clearing.
Partial cache deletion
Actions that will trigger partial cache deletion:
- creating/updating/deleting posts, pages, or public custom post types
- creating/updating/deleting comments on a post
Disable automatic cache clearing
It is technically possible to prevent WP Rocket from clearing the cache. Here’s how:
Disable all automatic cache clearing
Heads up! Altering automated cache management can result in outdated content somewhere on your website. Proceed with caution!