Title: Cache preload
Last modified: March 7, 2020

---

# Cache preload

 *  Resolved [diamantweb](https://wordpress.org/support/users/diamantweb/)
 * (@diamantweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/)
 * Hello Marko,
    I was tasked to keep a website always chached and prevent user 
   to have to generate pages on-visit. Besically, I mean to use W3TC functions to
   set the right timing generating pages automatically. I have read something of
   sitemap that have to be uploaded to enable W3TC to generate pages automatically(
   pages indicated in simemap).
 * If I am right, does it work every particular timeframe or there is a way to indicate
   a time when pages from the sitemap are automatically generated.
 * I hope, I found the whole point right. If my description is not clear, please
   consider only my prime idea in the first sentence to do the task.
 * Br, Waldemar
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-preload-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/#post-12521901)
 * Hello [@diamantweb](https://wordpress.org/support/users/diamantweb/)
 * Thank you for your inquiry and I am happy to assist you with this.
    Here are 
   some general rules for Cache Preload: Example: You have 1000 pages. Update interval
   900s (he number of seconds to wait before creating another set of cached pages.)
   Pages pr interval 10 (Limit the number of pages to create per batch. Fewer pages
   may be better for under-powered servers.) This means that 10 pages will be cached
   every 15 minutes so your entire website will be cached in 25hrs, You can, of 
   course, adjust these settings and reduce the update interval or increase the 
   pages per interval. this is entirely up to you but take note that this may increase
   the usage of server resources. The preload based on wp cron so it doesn’t work
   when you don’t have WordPress-handled requests. It would be a good idea to add
   define(‘DISABLE_WP_CRON’, true); and Once this is done, you should create a custom
   cron job that will call wp-cron.php at a set interval. Make sure sitemap file
   is set and contains URLs If you don’t want to rely on wp-cron – use wp-CLI command
   for preloading and Unix cron `wp w3-total-cache pgcache_prime` Thank you!
 *  Thread Starter [diamantweb](https://wordpress.org/support/users/diamantweb/)
 * (@diamantweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/#post-12523258)
 * Hey Marko,
    I am appreciate your response.
 * define(‘DISABLE_WP_CRON’, true); seems to have beed added in the config file.
   Would you pls suggest me a guide of how to manage adding a cron rule. I mean 
   this: ” … and Once this is done, you should create a custom cron job that will
   call wp-cron.php at a set interval.”
 * Should I use a tool, that is a plugin or some alternative?
 * Waldemar
 *  Thread Starter [diamantweb](https://wordpress.org/support/users/diamantweb/)
 * (@diamantweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/#post-12523694)
 * Hello Marko,
    I added a line to deactivate wp cron job and set cron job in admin
   panel every 15 minutes. Nevertheless, the pages are cached once it is visite,
   I rechecked it several times. It means above mentioned cahnged are not being 
   applied ..
 * On the cron job section in admin I added the folowing line. It is being executed
   every 15 min: wget -q -O – [https://dev1.cossmeta.online//wp-cron.php?doing_wp_cron](https://dev1.cossmeta.online//wp-cron.php?doing_wp_cron)
   >/dev/null 2>&1
 * Waldemar
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/#post-12523730)
 * Hello [@diamantweb](https://wordpress.org/support/users/diamantweb/)
 * You should try using the wp cli `wp w3-total-cache pgcache_prime`
    so insnstead
   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!
    -  This reply was modified 6 years, 3 months ago by [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/).

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

The topic ‘Cache preload’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/cache-preload-9/#post-12523730)
 * Status: resolved