Index: src/wp-admin/includes/template.php
===================================================================
--- src/wp-admin/includes/template.php	(revision 41631)
+++ src/wp-admin/includes/template.php	(working copy)
@@ -596,6 +596,10 @@
 	$keys = apply_filters( 'postmeta_form_keys', null, $post );
 
 	if ( null === $keys ) {
+		$keys = wp_cache_get( 'postmeta_form_keys', 'posts' );
+	}
+
+	if ( ! $keys ) {
 		/**
 		 * Filters the number of custom fields to retrieve for the drop-down
 		 * in the Custom Fields meta box.
@@ -612,6 +616,8 @@
 			ORDER BY meta_key
 			LIMIT %d";
 		$keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) );
+
+		wp_cache_set( 'postmeta_form_keys', $keys, 'posts' );
 	}
 
 	if ( $keys ) {
Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 41631)
+++ src/wp-includes/post.php	(working copy)
@@ -1713,6 +1713,8 @@
 	if ( $the_post = wp_is_post_revision($post_id) )
 		$post_id = $the_post;
 
+	wp_cache_delete( 'postmeta_form_keys', 'posts' );
+
 	return add_metadata('post', $post_id, $meta_key, $meta_value, $unique);
 }
 
@@ -1736,6 +1738,8 @@
 	if ( $the_post = wp_is_post_revision($post_id) )
 		$post_id = $the_post;
 
+	wp_cache_delete( 'postmeta_form_keys', 'posts' );
+		
 	return delete_metadata('post', $post_id, $meta_key, $meta_value);
 }
 
