From 6a35efe1e5040f07f93bdca17c6bf70c4fc9ff86 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 26 Feb 2014 22:04:52 +0000 Subject: [PATCH] Revert [27115] and let cache backends handle the stripping of spaces in cache keys as necessary. microtime() returns greater precision than microtime(true). see #27000, #23448, #26903, #14485. git-svn-id: https://develop.svn.wordpress.org/trunk@27300 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 6 +++--- src/wp-includes/general-template.php | 2 +- src/wp-includes/post.php | 4 ++-- src/wp-includes/taxonomy.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 6386afcc43..f7ddbc478f 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -280,7 +280,7 @@ class WP_Comment_Query { $key = md5( serialize( compact(array_keys($defaults)) ) ); $last_changed = wp_cache_get( 'last_changed', 'comment' ); if ( ! $last_changed ) { - $last_changed = microtime( true ); + $last_changed = microtime(); wp_cache_set( 'last_changed', $last_changed, 'comment' ); } $cache_key = "get_comments:$key:$last_changed"; @@ -1563,7 +1563,7 @@ function wp_insert_comment($commentdata) { */ do_action( 'wp_insert_comment', $id, $comment ); - wp_cache_set( 'last_changed', microtime( true ), 'comment' ); + wp_cache_set( 'last_changed', microtime(), 'comment' ); return $id; } @@ -2361,7 +2361,7 @@ function clean_comment_cache($ids) { foreach ( (array) $ids as $id ) wp_cache_delete($id, 'comment'); - wp_cache_set( 'last_changed', microtime( true ), 'comment' ); + wp_cache_set( 'last_changed', microtime(), 'comment' ); } /** diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 9ec4d26f56..98898c3f99 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -985,7 +985,7 @@ function wp_get_archives($args = '') { $last_changed = wp_cache_get( 'last_changed', 'posts' ); if ( ! $last_changed ) { - $last_changed = microtime( true ); + $last_changed = microtime(); wp_cache_set( 'last_changed', $last_changed, 'posts' ); } diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 50b9c4481d..f3f1f19971 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3733,7 +3733,7 @@ function get_pages( $args = array() ) { $key = md5( serialize( compact(array_keys($defaults)) ) ); $last_changed = wp_cache_get( 'last_changed', 'posts' ); if ( ! $last_changed ) { - $last_changed = microtime( true ); + $last_changed = microtime(); wp_cache_set( 'last_changed', $last_changed, 'posts' ); } @@ -4754,7 +4754,7 @@ function clean_post_cache( $post ) { do_action( 'clean_page_cache', $post->ID ); } - wp_cache_set( 'last_changed', microtime( true ), 'posts' ); + wp_cache_set( 'last_changed', microtime(), 'posts' ); } /** diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 9fbfcaffc6..0960fb24ce 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1287,7 +1287,7 @@ function get_terms($taxonomies, $args = '') { $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); $last_changed = wp_cache_get( 'last_changed', 'terms' ); if ( ! $last_changed ) { - $last_changed = microtime( true ); + $last_changed = microtime(); wp_cache_set( 'last_changed', $last_changed, 'terms' ); } $cache_key = "get_terms:$key:$last_changed"; @@ -2750,7 +2750,7 @@ function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true) { do_action('clean_term_cache', $ids, $taxonomy); } - wp_cache_set( 'last_changed', microtime( true ), 'terms' ); + wp_cache_set( 'last_changed', microtime(), 'terms' ); } /**