Ticket #22176: 22176.diff
File 22176.diff, 1.3 KB (added by , 8 years ago) |
---|
-
wp-includes/post.php
4507 4507 wp_cache_delete( 'all_page_ids', 'posts' ); 4508 4508 do_action( 'clean_page_cache', $post->ID ); 4509 4509 } 4510 4511 if ( function_exists( 'wp_cache_incr' ) ) { 4512 wp_cache_incr( 'last_changed', 1, 'posts' ); 4513 } else { 4514 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 4515 wp_cache_set( 'last_changed', $last_changed + 1, 'posts' ); 4516 } 4510 4517 } 4511 4518 4512 4519 /** -
wp-includes/query.php
2661 2661 2662 2662 $this->request = apply_filters( 'posts_request_ids', $this->request, $this ); 2663 2663 2664 $ids = $wpdb->get_col( $this->request ); 2664 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 2665 if ( ! $last_changed ) 2666 $last_changed = wp_cache_set( 'last_changed', 1, 'posts' ); 2667 $this->cache_key = md5( $this->request ) . $last_changed; 2665 2668 2669 if ( ! $ids = wp_cache_get( $this->cache_key, 'posts' ) ) { 2670 $ids = $wpdb->get_col( $this->request ); 2671 wp_cache_set( $this->cache_key, $ids, 'posts' ); 2672 } 2673 2666 2674 if ( $ids ) { 2667 2675 $this->posts = $ids; 2668 2676 $this->set_found_posts( $q, $limits );