Get rid of wp_cache_key(), as it's not really that useful. See [15838]

git-svn-id: http://svn.automattic.com/wordpress/trunk@15839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-10-18 21:54:39 +00:00
parent ea1470d6af
commit efb8b6abcc
2 changed files with 3 additions and 21 deletions

View File

@ -279,24 +279,6 @@ function is_serialized_string( $data ) {
return false;
}
/**
* Generates a unique key from an argument
*
* @since 3.1
*
* @param mixed $arg
* @return string
*/
function wp_cache_key( $arg ) {
if ( is_scalar( $arg ) )
return md5( $arg );
$arg = (array) $arg;
sort( $arg );
return md5( serialize( $arg ) );
}
/**
* Retrieve option value based on name of option.
*
@ -4436,4 +4418,4 @@ function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = ar
*/
function no_admin_bar() {
define('WP_SHOW_ADMIN_BAR', false);
}
}

View File

@ -3989,7 +3989,7 @@ function _get_last_post_time( $timezone, $field ) {
$post_types = apply_filters( "get_lastpost{$field}_post_types", (array) $post_types );
$key = "lastpost{$field}:$blog_id:$timezone:" . wp_cache_key( $post_types );
$key = "lastpost{$field}:$blog_id:$timezone:" . md5( serialize( $post_types ) );
$date = wp_cache_get( $key, 'timeinfo' );
@ -5048,4 +5048,4 @@ function wp_quickpress_form( $args = array(), $post_type = 'post'){
endif;
}
?>
?>