Make WordPress Core

#50352 closed enhancement (fixed)

Implement wp_cache_get_multi in core

Reported by: spacedmonkey Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Cache API Keywords: has-patch
Focuses: performance Cc:


Now that wp_cache_get_multi was merged in [47938], it can be used in core. In the original ticket, @spacedmonkey noted some places where this function can now be used. Including

  • update_object_term_cache
  • update_meta_cache
  • _get_non_cached_ids

Attachments (1)

50362.diff (634 bytes) - added by Chouby 12 months ago.

Download all attachments as: .zip

Change History (10)

This ticket was mentioned in PR #332 on WordPress/wordpress-develop by spacedmonkey.

12 months ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #hosting-community by spacedmonkey. View the logs.

12 months ago

#4 @SergeyBiryukov
12 months ago

  • Milestone changed from Awaiting Review to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 follow-up: @whyisjake
12 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

Fixed in [48055].

#7 in reply to: ↑ 5 @Chouby
12 months ago

After [48055], update_object_term_cache() caches only one term due to the break instruction which has been left after the 2 foreach loops have been inverted.

Last edited 12 months ago by Chouby (previous) (diff)

#8 @Chouby
12 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

12 months ago

#9 @SergeyBiryukov
12 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 48187:

Taxonomy: Make sure update_object_term_cache() caches all terms that were not already cached.

Due to an unintended break instruction from a previous iteration, the function cached only one term in each taxonomy.

Follow-up to [48055].

Props Chouby.
Fixes #50352.

Note: See TracTickets for help on using tickets.