Cache is incomplete, cleared too frequently or randomly
Sometimes, you might notice the cache is being cleared randomly, without a clear explanation. Some symptoms of this could be:
- The cache folder is incomplete.
- There is a random number of cached pages.
- You experience a sudden slowness of some pages.
- There are too many
rocket_preload_job_preload_urlentries in the Action Scheduler actions table.
If you notice the cache is cleared inconsistently, please keep reading to find potential causes and solutions.
Third party plugins
Many plugins interact with cache plugins like WP Rocket, clearing the cached files under some circumstances to prevent issues with outdated contents.
This can happen, for example, when you make changes to your website. Plugins can use our function:
rocket_clean_domain() to delete the whole cache.
Known plugins that might be clearing your cache:
- Divi Overlays plugin
rocket_clean_poston content updates
- Divi Bars plugin
rocket_clean_domainto be called on content updates
- Maintenance plugin
It will clear the cache when you put the site in maintenance mode.
- Really Simple SSL plugin
It will clear the cache when they detect any changes to the htaccess file.
- Smash Balloon Instagram Feed
It will clear the whole cache when they need to update their own cache.
- User Registration plugin
It clears the cache every time the registration form is rendered.
- LayerSlider WP
Its Clear 3rd party caches option, which will call clear WP Rocket on every slider update.
- Hide My WP Ghost – Security Plugin
It will empty WP Rocket's cache after saving their settings.
- Judge.me Product Reviews for WooCommerce
This plugin will clear WP Rocket's cache each time a new review is published. They do it by calling
- Woostify Pro plugin
Woostify clears the Elementor cache after adding their scripts in the frontend, which in turn triggers WP Rocket cache clearing.
- Bertha AI
This plugin is creating taxonomies, and triggering full cache clearing constantly.
- Divi LearnDash Kit
The cache is constantly cleared whenever a non-cached page of the sfwd-courses CPT is accessed.
- SiteOrigin Widgets Bundle
The whole cache is cleared every time a widget is updated on a post / page.
We have also discovered that the cache can be unexpectedly cleared in some specific cases:
- Excessive terms clearing during the partial purge #2549
- When a slug is shared amongst a page and posts, all the posts might be cleared during partial purge #2698
- Cache recreated on each page load #2156
- Extensive cache clearing when updating non-published products/CPTs #3770
- Cache is cleared too often when importing products
The files 01-full-cache-clear.txt, 02-partial-cache-clear.txt and 03-rocket_clean_files_log.txt are created in the WordPress installation directory.
To discover if the cache clearing is triggered by one of your plugins or by your theme, you can install a plugin like String Locator, and search for rocket_clean_domain() to see if that function is being used somewhere.
It can be hard to "fix" this, but you can take actions to mitigate the effects of unexpected cache clearing:
- Deactivate plugins: If you have plugins that are clearing the cache and these are not important for your project.
- Theme: If you discover your theme is clearing the cache, ask the theme developer to see if it is really needed.
- Enable Preload: Ensure WP Rocket's Preload is enabled.
- Server-side Cron Job: Set up a server-side cron job to have a more reliable preloading.