Make WordPress Core

Opened 11 months ago

Last modified 6 weeks ago

#56105 new enhancement

Call update_post_parent_caches in the_post function in WP_Query class

Reported by: priyankkpatel's profile priyankkpatel Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Query Keywords: needs-patch needs-unit-tests
Focuses: performance Cc:

Description

Hello Team,

In the_post function class WP_Query, update_post_author_caches is already in use but not update_post_parent_caches.

I am not sure if it is because of update_post_parent_caches calls the private function _prime_post_caches or what.

Change History (4)

#1 @priyankkpatel
11 months ago

  • Component changed from General to Query

This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.


11 months ago

#3 @ironprogrammer
11 months ago

  • Focuses performance added
  • Keywords needs-patch needs-unit-tests added
  • Type changed from defect (bug) to enhancement

Thanks for your report @priyankkpatel!

Related: #55593, #56036, #56037

#4 @spacedmonkey
6 weeks ago

@priyankkpatel Can you provide anymore context here? Why is it needed to prime the caches on post parents in the loop. A standard loop does not call the parent. There is nothing stopping you from call update_post_parent_caches within your own code, if you have an issue in your own theme/plugin.

Note: See TracTickets for help on using tickets.