Taxonomy: Cache results of term count queries.
Fixes #38295. Built from https://develop.svn.wordpress.org/trunk@38784 git-svn-id: http://core.svn.wordpress.org/trunk@38727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9935b60e72
commit
acd764a1d3
|
@ -690,7 +690,9 @@ class WP_Term_Query {
|
|||
}
|
||||
|
||||
if ( 'count' == $_fields ) {
|
||||
return $wpdb->get_var( $this->request );
|
||||
$count = $wpdb->get_var( $this->request );
|
||||
wp_cache_set( $cache_key, $count, 'terms' );
|
||||
return $count;
|
||||
}
|
||||
|
||||
$terms = $wpdb->get_results( $this->request );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38783';
|
||||
$wp_version = '4.7-alpha-38784';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue