Sticky posts issues when Redis cache is full (cont’d)
-
This code:
wp_update_post( array( 'ID' => $post->ID, 'menu_order' => $start), false, false );
is rather slow when updating dozens of posts.
@tillkruess is it safe to use this code instead:
$wpdb->update($wpdb->posts, array( 'menu_order' => $start ), array( 'ID' => $post->ID) );
clean_post_cache($post->ID);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Sticky posts issues when Redis cache is full (cont’d)’ is closed to new replies.