Opened 4 years ago
Last modified 3 years ago
#56105 new enhancement
Call update_post_parent_caches in the_post function in WP_Query class
| Reported by: | priyankkpatel | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | needs-patch needs-unit-tests |
| Cc: | Focuses: | performance |
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)
This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.
4 years ago
#3
@
4 years ago
- Focuses performance added
- Keywords needs-patch needs-unit-tests added
- Type defect (bug) → enhancement
#4
@
3 years 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for your report @priyankkpatel!
Related: #55593, #56036, #56037