Ticket #23167: 23167.2.diff
File 23167.2.diff, 1.4 KB (added by , 12 years ago) |
---|
-
wp-includes/post.php
3652 3652 // $args can be whatever, only use the args defined in defaults to compute the key 3653 3653 $key = md5( serialize( compact(array_keys($defaults)) ) ); 3654 3654 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 3655 if ( ! $last_changed ) 3656 $last_changed = wp_cache_set( 'last_changed', 1, 'posts' ); 3655 if ( ! $last_changed ) { 3656 wp_cache_set( 'last_changed', 1, 'posts' ); 3657 $last_changed = 1; 3658 } 3657 3659 3658 3660 $cache_key = "get_pages:$key:$last_changed"; 3659 3661 if ( $cache = wp_cache_get( $cache_key, 'posts' ) ) { -
wp-includes/comment.php
250 250 // $args can be whatever, only use the args defined in defaults to compute the key 251 251 $key = md5( serialize( compact(array_keys($defaults)) ) ); 252 252 $last_changed = wp_cache_get( 'last_changed', 'comment' ); 253 if ( ! $last_changed ) 254 $last_changed = wp_cache_set( 'last_changed', 1, 'comment' ); 253 if ( ! $last_changed ) { 254 wp_cache_set( 'last_changed', 1, 'comment' ); 255 $last_changed = 1; 256 } 255 257 $cache_key = "get_comments:$key:$last_changed"; 256 258 257 259 if ( $cache = wp_cache_get( $cache_key, 'comment' ) )