Preload trying to cache dynamic pages, causing the job the lock up
-
Using WP 3.8 & WPSC 1.4… It looks like when you preload pages the preload logic is just doing a query to get ALL pages like so:
wp-cache.php
(line 2965)
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type != 'revision' AND post_type != 'nav_menu_item' ) AND post_status = 'publish' ORDER BY ID ASC LIMIT $c, 100" );
The problem is that this will also fetch pages that are dynamic (specifically, I’m using WooCommerce so it’s getting Cart / Checkout / My Account etc).
Normally that wouldn’t be a big deal because those pages are defining
DONOTCACHEPAGE
to true for normal front end visits. However if you try to run the preloader it looks like the cron job hits some of those pages (for example, the payment page) and those pages cause a redirect to happen. The job freezes and I can’t preload any other pages after my WooCommerce pages.My question is, can we add any sort of blacklist for the preloader? Can anyone think of any other creative way to prevent the preloader from fetching a set of pages (seeing as how the preloader logic doesn’t rely on the DONOTCACHEPAGE constant for each page lookup)?
Thanks!
- The topic ‘Preload trying to cache dynamic pages, causing the job the lock up’ is closed to new replies.