Title: Schedule cache clearing
Last modified: March 21, 2018

---

# Schedule cache clearing

 *  Resolved [Jackky](https://wordpress.org/support/users/jackky/)
 * (@jackky)
 * [8 years ago](https://wordpress.org/support/topic/schedule-cache-clearing/)
 * Hi, I need to schedule deleting all cached files twice a day. How can I achive
   this?

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

 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [8 years ago](https://wordpress.org/support/topic/schedule-cache-clearing/#post-10100143)
 * Do your css or js files change twice a day?
    There should be absolutely no need
   to do that, unless you change the css or js code twice a day.
 * If you really need to programatically purge the cache, make sure you also purge
   any server or cache plugins after you purge fvm.
 *     ```
       if (function_exists('fvm_purge_all')) {
           fvm_purge_all(); # deletes fvm transients and deletes js / css cache files
       }
       ```
   
 * There’s another function that tries to purge third party cache plugins, but it
   may or may not work on your server. I would advise you to use your own cache 
   system method to clear the cache.
 *     ```
       if (function_exists('fastvelocity_purge_others')) {
           fastvelocity_purge_others(); # tries to purge some third party caches
       }
       ```
   
 *  Thread Starter [Jackky](https://wordpress.org/support/users/jackky/)
 * (@jackky)
 * [8 years ago](https://wordpress.org/support/topic/schedule-cache-clearing/#post-10100371)
 * Thank you! Will test this. Yes, I need this, because I’m downloading external
   js localy twice a day (scripts like google analytics, to increase page loading)
 *  Plugin Author [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [8 years ago](https://wordpress.org/support/topic/schedule-cache-clearing/#post-10101432)
 * Google analytics is safe to cache for 2 weeks generally, (so that you know).
   
   It will work as usual even if they update the script and you have it on cache,
   since it’s usually backwards compatible. At worst, you wouldn’t have analytics
   data for some “new variables” for a few days.
 * But yes, that’s a good reason you would want to purge the cache 🙂
 * Thanks.

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

The topic ‘Schedule cache clearing’ is closed to new replies.

 * ![](https://ps.w.org/fast-velocity-minify/assets/icon-128x128.jpg?rev=1440946)
 * [Fast Velocity Minify](https://wordpress.org/plugins/fast-velocity-minify/)
 * [Support Threads](https://wordpress.org/support/plugin/fast-velocity-minify/)
 * [Active Topics](https://wordpress.org/support/plugin/fast-velocity-minify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fast-velocity-minify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fast-velocity-minify/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Raul P.](https://wordpress.org/support/users/alignak/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/schedule-cache-clearing/#post-10101432)
 * Status: resolved