Make WordPress Core


Ignore:
Timestamp:
06/10/2022 01:37:52 PM (2 years ago)
Author:
spacedmonkey
Message:

Prime users cache in WP_Query and post REST API controller.

For a call to WP_Query or a post REST API request that contains posts from multiple authors, call the cache_users function, to ensure that all user data for post authors is primed in
a single database query. This results in far fewer database queries on multiple author sites.

Props spacedmonkey, timothyblynjacobs, peterwilsoncc.
Fixes #55716.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.