From 1b2b394a91d3c53d414557c86ac019234c5a7d97 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 22 Jan 2013 15:52:13 +0000 Subject: [PATCH] Avoid the appearance of a magic number. Props nacin see #23167 git-svn-id: http://core.svn.wordpress.org/trunk@23320 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- wp-includes/post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 6ac4aef338..78a364acb0 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -251,8 +251,8 @@ class WP_Comment_Query { $key = md5( serialize( compact(array_keys($defaults)) ) ); $last_changed = wp_cache_get( 'last_changed', 'comment' ); if ( ! $last_changed ) { - wp_cache_set( 'last_changed', 1, 'comment' ); $last_changed = 1; + wp_cache_set( 'last_changed', $last_changed, 'posts' ); } $cache_key = "get_comments:$key:$last_changed"; diff --git a/wp-includes/post.php b/wp-includes/post.php index 0ae90a3d54..959591aaa3 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3653,8 +3653,8 @@ function get_pages($args = '') { $key = md5( serialize( compact(array_keys($defaults)) ) ); $last_changed = wp_cache_get( 'last_changed', 'posts' ); if ( ! $last_changed ) { - wp_cache_set( 'last_changed', 1, 'posts' ); $last_changed = 1; + wp_cache_set( 'last_changed', $last_changed, 'posts' ); } $cache_key = "get_pages:$key:$last_changed";