Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 23 months ago

#50352 closed enhancement (fixed)

Implement wp_cache_get_multiple() in core

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

Description (last modified by SergeyBiryukov)

Now that wp_cache_get_multiple() 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 4 years ago.

Download all attachments as: .zip

Change History (12)

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


4 years ago
#1

  • Keywords has-patch added; needs-patch removed

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


4 years ago

#4 @SergeyBiryukov
4 years ago

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

#5 follow-up: @whyisjake
4 years ago

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

Fixed in [48055].

#7 in reply to: ↑ 5 @Chouby
4 years 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 4 years ago by Chouby (previous) (diff)

#8 @Chouby
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@Chouby
4 years ago

#9 @SergeyBiryukov
4 years 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.

#10 @spacedmonkey
3 years ago

#22174 was marked as a duplicate.

#11 @SergeyBiryukov
23 months ago

  • Description modified (diff)
  • Summary changed from Implement wp_cache_get_multi in core to Implement wp_cache_get_multiple() in core
Note: See TracTickets for help on using tickets.