Title: preload cache
Last modified: May 11, 2020

---

# preload cache

 *  Resolved [rashkoff](https://wordpress.org/support/users/rashkoff/)
 * (@rashkoff)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/)
 * Hello,
 * I want to ask which is the best way to have cache pre-load with woocommerce.
   
   I’m notice that the W3TC don’t work always. The store has 2000 URL in xml sitemap
   My idea is to clean the cache by night and make the preload. Can you give me 
   some tips how to do all of this? Thanks Ricky

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12819460)
 * Hello [@rashkoff](https://wordpress.org/support/users/rashkoff/)
 * Thank you for your inquiry and I am happy to assist you with this.
    You can use
   recommended settings in the Cache Preload. It would be a good idea to disable
   define(‘DISABLE_WP_CRON’, true); and Once this is done, create a cron job that
   will call wp-cron.php at a set interval As for the cache lifetime, if for example,
   you have 2000 pages that you want to be preloaded and you are using the default
   settings, 10 pages per 900s which means that all of the pages will be preloaded
   in 50 hrs. but since you want the entire website to be preloaded in 24 hrs you
   should either increase the number of pages per interval or decrease the interval
   of 900s to the number of seconds/minutes that will accomplish this. Please note
   that this may cause a huge server load. As the page is cached only when visited(
   without the priming) Cache preload may help to cache all pages. You should use
   wp cli for this wp w3-total-cache pgcache_prime So, instead of calling wp cron
   via crontab – you should call it directly via wp w3-total-cache pgcache_prime
   and track the output which pages / sitemap positions are primed by script Thank
   you!
 *  Thread Starter [rashkoff](https://wordpress.org/support/users/rashkoff/)
 * (@rashkoff)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12820314)
 * Hello [@vmarko](https://wordpress.org/support/users/vmarko/)
 * Thanks for the reply
 * The site is on VPS and the average preload for page is 4s.
    So 2000 * 5s = 10000/
   60 / 60 = almost 3 hours
 * I’m not familiar with wp cli
 * I can call any cron job using Cpanel
 * My request is to automatize the process:
    1. every night to call a cron job which
   purge all the cache and then rebuild. 2. disable all option which automatic clean
   the cache (Purge policy: Page cache is all disable)
 * Where should I looking for this plan?
 * Thanks
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12820816)
 * Hello [@rashkoff](https://wordpress.org/support/users/rashkoff/)
 * What do you mean by “average preload for page is 4s.”?
    Thanks!
 *  Thread Starter [rashkoff](https://wordpress.org/support/users/rashkoff/)
 * (@rashkoff)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12821018)
 * Hi,
    I’ve made some test with other plugins and to preload 1 page tooks 4s
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12821079)
 * Hello [@rashkoff](https://wordpress.org/support/users/rashkoff/)
 * This is unrelated to the cache preload in W3 Total Cache.
    If you want to use
   corn on your server, you should set the corn to the desired interval for the 
   selected bulk of pages, for example, 10 pages every 10 minutes. When preload 
   finishes the next 10 pages will be preloaded after 10 mins. As for clearing the
   cache, you can also set up a corn job and call `w3tc_flush_all()` For assistance
   with the corn jobs please reach out to your host for assistance. Thank you!
 *  Thread Starter [rashkoff](https://wordpress.org/support/users/rashkoff/)
 * (@rashkoff)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12821116)
 * Hi,
    do you have a php template which I can edit with my website and then I call
   the php file form cpanel cron job with wget?
 * Thanks
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12821339)
 * Hello [@rashkoff](https://wordpress.org/support/users/rashkoff/)
 * No, we do not have a PHP template for this.
    But you can check the w3-total-cache-
   api.php in wp-content/plugins/w3-total-cache where you can check the functions
   dor purging and clearing the cache. Thank you!

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

The topic ‘preload cache’ 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 years, 1 month ago](https://wordpress.org/support/topic/preload-cache-4/#post-12821339)
 * Status: resolved