diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
index e30094d..11c967a 100644
--- a/src/wp-includes/class-wp-comment-query.php
+++ b/src/wp-includes/class-wp-comment-query.php
@@ -363,7 +363,7 @@ class WP_Comment_Query {
 		}
 
 		// $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
-		$key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
+		$key = md5( serialize( $this->query_vars ) );
 		$last_changed = wp_cache_get( 'last_changed', 'comment' );
 		if ( ! $last_changed ) {
 			$last_changed = microtime();
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index cc8e843..1f9e6eb 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -4402,7 +4402,7 @@ function get_pages( $args = array() ) {
 	}
 
 	// $args can be whatever, only use the args defined in defaults to compute the key.
-	$key = md5( serialize( wp_array_slice_assoc( $r, array_keys( $defaults ) ) ) );
+	$key = md5( serialize( $r ) );
 	$last_changed = wp_cache_get( 'last_changed', 'posts' );
 	if ( ! $last_changed ) {
 		$last_changed = microtime();
diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index 78dd52c..d9ba68e 100644
--- a/src/wp-includes/taxonomy.php
+++ b/src/wp-includes/taxonomy.php
@@ -1437,7 +1437,7 @@ function get_terms( $taxonomies, $args = '' ) {
 	$query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits";
 
 	// $args can be anything. Only use the args defined in defaults to compute the key.
-	$key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $defaults ) ) ) . serialize( $taxonomies ) . $query );
+	$key = md5( serialize( $args ) . serialize( $taxonomies ) . $query );
 	$last_changed = wp_cache_get( 'last_changed', 'terms' );
 	if ( ! $last_changed ) {
 		$last_changed = microtime();
