mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Taxonomy: Implement wp_cache_get_multiple in wp_queue_posts_for_term_meta_lazyload.
In [47938] the `wp_cache_get_multiple` function was added to core. This function allows for multiple cache keys to be received from cache in a single function call. `wp_queue_posts_for_term_meta_lazyload` function does many calls to cache. To get taxonomy relationship for multiple posts and get all terms. Replace calls to `get_object_term_cache` with calls to `wp_cache_get_multiple` and `_prime_term_caches`. This improves performance on sites that implement the `wp_cache_get_multiple` in their object caching drop-in. Props spacedmonkey, ocean90, SergeyBiryukov, costdev, flixos90, joemcgill, 10upsimon. Fixes #57150. git-svn-id: https://develop.svn.wordpress.org/trunk@55252 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -194,6 +194,10 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase {
|
||||
remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) );
|
||||
$this->_restore_hooks();
|
||||
wp_set_current_user( 0 );
|
||||
|
||||
$lazyloader = wp_metadata_lazyloader();
|
||||
$lazyloader->reset_queue( 'term' );
|
||||
$lazyloader->reset_queue( 'comment' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user