[wp-trac] [WordPress Trac] #55716: Prime users in cache in WP_Query

WordPress Trac noreply at wordpress.org
Thu May 12 15:19:13 UTC 2022


#55716: Prime users in cache in WP_Query
--------------------------+----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Query         |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+----------------------------
 In WP_Query, when a post is setup using `setup_postdata` /
 `generate_postdata` methods, the function `get_userdata` is called. If
 there are posts that are by multiple authors, this can result in a query
 per user / author.

 The function `cache_users` can be called and caches primed for all users
 in a single request.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55716>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list