Avoid the appearance of a magic number.
Props nacin see #23167 git-svn-id: https://develop.svn.wordpress.org/trunk@23320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7442b3894b
commit
7ff77d2e02
@ -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";
|
||||
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user