Title: object cache cleanup task not running
Last modified: November 17, 2025

---

# object cache cleanup task not running

 *  [proller](https://wordpress.org/support/users/proller/)
 * (@proller)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/)
 * Hello,
 * I have an issue where the object cache and db cache garbage collection tasks 
   do not run, while the page cache and minify cleanup tasks run without issues.
 * The object cache and db cache are set to the Redis method, enabled, and working.
 * I checked via the WP Crontrol plugin, and the “w3_objectcache_cleanup” and “w3_dbcache_cleanup”
   tasks are displayed as disabled. This is the same even with default or higher
   values for “Maximum lifetime of cache objects” and “Garbage collection interval”.
 * How can I enable garbage collection for the object cache and db cache?
   [https://snipboard.io/ERmcGM.jpg](https://snipboard.io/ERmcGM.jpg)
   [https://snipboard.io/hkMCL1.jpg](https://snipboard.io/hkMCL1.jpg)[https://snipboard.io/tRYiTI.jpg](https://snipboard.io/tRYiTI.jpg)
   [https://snipboard.io/ph6Nqg.jpg](https://snipboard.io/ph6Nqg.jpg)

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18723967)
 * Hello [@proller](https://wordpress.org/support/users/proller/)
 * Thank you for reaching out and I am happy to help!
   The Page Cache and Minify 
   are set to cache to Disk. The garbage collection interval is used as it says 
   in the description: If caching to disk, specify how frequently expired cache 
   data is removed. For busy sites, a lower value is best.
 * This being said, the GC interval is not running if the caching method is set 
   to Redis or Memcached, and this is where the “Default lifetime of cache objects”
   comes into place as it etermines the natural expiration time of unchanged cache
   items. The higher the value, the larger the cache.
   I hope this helps!Thanks!
 *  Thread Starter [proller](https://wordpress.org/support/users/proller/)
 * (@proller)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18724186)
 * Hello,
 * Thank you for your reply.
 * So, the garbage collection interval is not needed for the redis method.
 * My issue is that some changes on the site like a theme update or updating page
   content cause broken styling for cached pages untill I manually flush the object
   cache and page cache. I assume that the page cache is renewed after those changes,
   while the object cache remains the same until its lifetime expires. So, the new
   page cache uses old data from the object cache. Since my page cache gc interval
   is 1 day, even if the object cache is cleared after the changes, it has to wait
   until the page cache gc task runs.
 * Is this accurate? If so, instead of reducing the page cache gc interval, would
   hooking the object cache flush to the page cache flush solve this issue?
 *     ```wp-block-code
       add_action( 'w3tc_flush_posts', 'custom_flush_object_cache_on_page_flush' );function custom_flush_object_cache_on_page_flush() {    if ( function_exists( 'w3tc_flush_group' ) ) {        w3tc_flush_group( 'object' );    }}
       ```
   
    -  This reply was modified 6 months, 3 weeks ago by [proller](https://wordpress.org/support/users/proller/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18728278)
 * Hello [@proller](https://wordpress.org/support/users/proller/)
 * Can you please let me know if the issue persist if you only flush OC or Page 
   Cache?
 * Thanks!
 *  Thread Starter [proller](https://wordpress.org/support/users/proller/)
 * (@proller)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18728588)
 * Hello,
 * The issue is still there if I only flush either one of them.
 * I reproduced the issue on a couple of sites when I update the elementor plugin.(
   Elementor’s caching is disabled. Prevent caching of objects after settings change
   in css & js section is enabled.) Sites which use the wpbakery plugin (where the
   rest of the plugins and theme are the same) do not have this issue, so I believe
   the issue is related to Elementor.
 * When the issue occurs on a site where w3tc cdn (cloudfront) is enabled, the issue
   persists even after I flush all caches (whether at once or one by one). I had
   to disable and re-enable the cdn in order to get all pages working correctly.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18733648)
 * Hello [@proller](https://wordpress.org/support/users/proller/)
 * Thank you for your feedback.
   Just to confirm, this is related to Elementor, and
   are you using Regenerate CSS option
 * Any chance you can try this solution?
 * [https://pastebin.com/raw/Z2NdizSE](https://pastebin.com/raw/Z2NdizSE)
 * Thank you!
 *  Thread Starter [proller](https://wordpress.org/support/users/proller/)
 * (@proller)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18736117)
 * Hello again,
 * Using Elementor’s Clear Files & Data option makes no difference in my case.
 * I applied the solution; however, it did not resolve the issue. The problem persists:
   flushing the page cache occasionally breaks the stylesheets on some pages.
 * I also applied the modification to the Elementor update package and installed
   it as an update. Unfortunately, clearing the page cache for the first time after
   the update broke most of the pages’ stylesheets, just like before.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 months ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18754114)
 * Hello [@proller](https://wordpress.org/support/users/proller/)
 * Thank you for your patience.
 * Can you please update the W3 Total Cache to the latest version and let me know
   if the problem persists, as we’ve added the fix for this
 * Thanks!

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

The topic ‘object cache cleanup task not running’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [6 months ago](https://wordpress.org/support/topic/object-cache-cleanup-task-not-running/#post-18754114)
 * Status: not resolved