Title: Autoptimize auto cache clear disable
Last modified: June 1, 2022

---

# Autoptimize auto cache clear disable

 *  Resolved [rrivv](https://wordpress.org/support/users/rrivv/)
 * (@rrivv)
 * [4 years ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/)
 * Hi
 * Is there a way to skip deleting last 3-5 versions of Autoptimize cache during
   auto clearing?
 * Or if not, just disable auto-clearing?
    Is “ao_cachechecker” cron process doing
   this, is it safe to stop this process?
 * We face an issue with Autoptimize+w3tc Page cache, when Au cache auto-cleared,
   but previous css/js Au cache file link remains in w3tc cached file, so site looks
   broken.
 * Thank you, Andy
    -  This topic was modified 4 years ago by [rrivv](https://wordpress.org/support/users/rrivv/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15700096)
 * hmm, Autoptimize does not clear it’s own cache, so it’s likely some other plugin(
   or your theme) is calling AO’s clearall function?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15712373)
 * Were you able to identify what is clearing the AO cache Andy?
 *  Thread Starter [rrivv](https://wordpress.org/support/users/rrivv/)
 * (@rrivv)
 * [4 years ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15712600)
 * Well, partly 🙂
    At least when I clear “all caches” manually with w3tc / “purge
   all caches” function, w3tc clears Au cache too.
 * So I believe in our case it is not an Autoptimize issue, but w3tc’s or w3tc+cron
   issue – sometimes w3tc delete’s autoptimize cache (by its own and in backend),
   but don’t update w3tc cached pages, that is why these cached pages contain old(
   outdated) Au files (autoptimize_xxx.css/autoptimize_xxx.js).
    -  This reply was modified 4 years ago by [rrivv](https://wordpress.org/support/users/rrivv/).
    -  This reply was modified 4 years ago by [rrivv](https://wordpress.org/support/users/rrivv/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15712861)
 * OK, below code snippet (which stops AO from “listening” to “clear all cache” 
   hooks, amongst others w3tc’s) might help to stop AO’s cache from being cleared;
 *     ```
       add_filter( 'autoptimize_filter_main_hookpagecachepurge', false );
       ```
   
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15759619)
 * any news rrivv ?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15801530)
 * No feedback so I assume this got resolved? Feel free to follow up if you still
   encounter issues!
 * have a nice day!
    frank

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Autoptimize auto cache clear disable’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-auto-cache-clear-disable/#post-15801530)
 * Status: resolved