Title: Delete all cache with cron?
Last modified: May 25, 2020

---

# Delete all cache with cron?

 *  [snipsnip](https://wordpress.org/support/users/snipsnip/)
 * (@snipsnip)
 * [6 years ago](https://wordpress.org/support/topic/delete-all-cache-with-cron/)
 * Hello,
    I am importing and updading products via API from a .net app at specific
   times every day. The WP super cache plugin deletes all cache when a post is published
   or updated, if I have checked the option. Does it mean that the customers will
   see updated price in the frontend even if they are not logged in? Also, the .
   net app sends scheduled sales and once the sale ends, for almost a whole day 
   the sale price becomes regular and the sale price is removed. When I run the 
   cron woocommerce_scheduled_sales the price is fixed, but only for logged in users.
   When I clear the cache manually, from the plugin settings, everything is good
   even for users that are not logged in. So, in the settings, I’ve set it, under
   clock, to run just five minutes after the scheduled sales cron. My question is,
   will this fix the frontend or should I make a cron to delete all files in the
   cache folder, on the server, at the specific time? Because I am not sure which
   cache the cron will clear.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdelete-all-cache-with-cron%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/delete-all-cache-with-cron/#post-13059066)
 * You’re probably better off writing your own job to clear the cache to make sure
   it is cleared at that time, or you can hook on to something that runs when the
   price changes.
    Use the function wp_cache_clear_cache() to clear the cache.

Viewing 1 replies (of 1 total)

The topic ‘Delete all cache with cron?’ is closed to new replies.

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

## Tags

 * [cron](https://wordpress.org/support/topic-tag/cron/)

 * 1 reply
 * 2 participants
 * Last reply from: [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/delete-all-cache-with-cron/#post-13059066)
 * Status: not resolved