From cf9f85dc8121a359d550ffa3b735fb48859eee88 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 24 Apr 2008 11:45:39 +0000 Subject: Merged with WP 2.5, revision 7806 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/taxonomy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wp-includes/taxonomy.php') diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index ad2614a..cc16a61 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -580,7 +580,9 @@ function &get_terms($taxonomies, $args = '') { return $empty_array; } - $key = md5( serialize( $args ) . serialize( $taxonomies ) ); + // $args can be whatever, only use the args defined in defaults to compute the key + $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) ); + if ( $cache = wp_cache_get( 'get_terms', 'terms' ) ) { if ( isset( $cache[ $key ] ) ) return apply_filters('get_terms', $cache[$key], $taxonomies, $args); -- cgit