Ticket #23448: 23448.diff
| File 23448.diff, 3.5 KB (added by westi, 4 months ago) |
|---|
-
wp-includes/taxonomy.php
1242 1242 $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); 1243 1243 $last_changed = wp_cache_get( 'last_changed', 'terms' ); 1244 1244 if ( ! $last_changed ) { 1245 $last_changed = 1;1245 $last_changed = time(); 1246 1246 wp_cache_set( 'last_changed', $last_changed, 'terms' ); 1247 1247 } 1248 1248 $cache_key = "get_terms:$key:$last_changed"; … … 2711 2711 do_action('clean_term_cache', $ids, $taxonomy); 2712 2712 } 2713 2713 2714 if ( function_exists( 'wp_cache_incr' ) ) { 2715 wp_cache_incr( 'last_changed', 1, 'terms' ); 2716 } else { 2717 $last_changed = wp_cache_get( 'last_changed', 'terms' ); 2718 wp_cache_set( 'last_changed', $last_changed + 1, 'terms' ); 2719 } 2714 wp_cache_set( 'last_changed', time(), 'terms' ); 2720 2715 } 2721 2716 2722 2717 /** -
wp-includes/post.php
3653 3653 $key = md5( serialize( compact(array_keys($defaults)) ) ); 3654 3654 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 3655 3655 if ( ! $last_changed ) { 3656 $last_changed = 1;3656 $last_changed = time(); 3657 3657 wp_cache_set( 'last_changed', $last_changed, 'posts' ); 3658 3658 } 3659 3659 … … 4672 4672 do_action( 'clean_page_cache', $post->ID ); 4673 4673 } 4674 4674 4675 if ( function_exists( 'wp_cache_incr' ) ) { 4676 wp_cache_incr( 'last_changed', 1, 'posts' ); 4677 } else { 4678 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 4679 wp_cache_set( 'last_changed', $last_changed + 1, 'posts' ); 4680 } 4675 wp_cache_set( 'last_changed', time(), 'posts' ); 4681 4676 } 4682 4677 4683 4678 /** -
wp-includes/comment.php
251 251 $key = md5( serialize( compact(array_keys($defaults)) ) ); 252 252 $last_changed = wp_cache_get( 'last_changed', 'comment' ); 253 253 if ( ! $last_changed ) { 254 $last_changed = 1;254 $last_changed = time(); 255 255 wp_cache_set( 'last_changed', $last_changed, 'comment' ); 256 256 } 257 257 $cache_key = "get_comments:$key:$last_changed"; … … 1292 1292 $comment = get_comment($id); 1293 1293 do_action('wp_insert_comment', $id, $comment); 1294 1294 1295 if ( function_exists( 'wp_cache_incr' ) ) { 1296 wp_cache_incr( 'last_changed', 1, 'comment' ); 1297 } else { 1298 $last_changed = wp_cache_get( 'last_changed', 'comment' ); 1299 wp_cache_set( 'last_changed', $last_changed + 1, 'comment' ); 1300 } 1295 wp_cache_set( 'last_changed', time(), 'comment' ); 1301 1296 1302 1297 return $id; 1303 1298 } … … 2050 2045 foreach ( (array) $ids as $id ) 2051 2046 wp_cache_delete($id, 'comment'); 2052 2047 2053 if ( function_exists( 'wp_cache_incr' ) ) { 2054 wp_cache_incr( 'last_changed', 1, 'comment' ); 2055 } else { 2056 $last_changed = wp_cache_get( 'last_changed', 'comment' ); 2057 wp_cache_set( 'last_changed', $last_changed + 1, 'comment' ); 2058 } 2048 wp_cache_set( 'last_changed', time(), 'comment' ); 2059 2049 } 2060 2050 2061 2051 /** -
wp-includes/general-template.php
919 919 920 920 $last_changed = wp_cache_get( 'last_changed', 'posts' ); 921 921 if ( ! $last_changed ) { 922 $last_changed = 1;922 $last_changed = time(); 923 923 wp_cache_set( 'last_changed', $last_changed, 'posts' ); 924 924 } 925 925