mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Cache API: Add wp_cache_get_multiple() to core functions.
* `update_object_term_cache` * `update_meta_cache` * `_get_non_cached_ids` See [47938]. Fixes #50352. Props spacedmonkey, tillkruss, lukecavanagh. git-svn-id: https://develop.svn.wordpress.org/trunk@48055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3410,10 +3410,11 @@ function update_object_term_cache( $object_ids, $object_type ) {
|
||||
$taxonomies = get_object_taxonomies( $object_type );
|
||||
|
||||
$ids = array();
|
||||
foreach ( (array) $object_ids as $id ) {
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
if ( false === wp_cache_get( $id, "{$taxonomy}_relationships" ) ) {
|
||||
$ids[] = $id;
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
$cache_values = wp_cache_get_multiple( (array) $object_ids, "{$taxonomy}_relationships" );
|
||||
foreach ( $cache_values as $key => $value ) {
|
||||
if ( false === $value ) {
|
||||
$ids[] = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user