Possible bug in WordPress Super Cache preloading process
-
In the Preload Tab of WP Super Cache it says “Caching is done from the newest post to the oldest so please consider only caching the newest if you have lots (10,000+) of posts.”
However in the function
wp_cron_preload_cache()
, located in filewp-cache.php
, I found the following code at line 3244:$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type IN ( $types ) ) AND post_status = 'publish' ORDER BY ID ASC LIMIT $c, 100" );
As I understand, this line selects posts from oldest to newest given the use of
ASC
in theORDER BY
clause.In my opinion, to select posts from newest to oldest as stated in the Preload tab, we should use
DESC
and notASC
:$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type IN ( $types ) ) AND post_status = 'publish' ORDER BY ID DESC LIMIT $c, 100" );
Is this really a bug or I have missed something?
I am using WP Super Cache 1.4.7.
- The topic ‘Possible bug in WordPress Super Cache preloading process’ is closed to new replies.