[wp-trac] [WordPress Trac] #40613: Add query cache to WP_User_Query class

WordPress Trac noreply at wordpress.org
Sun Apr 30 18:36:41 UTC 2017


#40613: Add query cache to WP_User_Query class
-----------------------------+-----------------------------
 Reporter:  johnjamesjacoby  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Users            |    Version:
 Severity:  normal           |   Keywords:
  Focuses:  performance      |
-----------------------------+-----------------------------
 When calling `get_users()` the query itself is not cached. If multiple
 calls to `get_users()` with the same `$args` array occur, each will result
 in a database hit.

 Note that each individual user object is cached, and that query caches
 will need to be invalidated when users are added/removed/edited.

 Theoretically, on busy sites with many users who are constantly changing
 passwords and things, caching user queries may not yield a significant
 performance improvement. For the majority of installations (where users
 are not shifted around nearly as much) this could be result in several
 additional cache hits per page load (especially with persistent caches in
 place.)

 Patch imminent.

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


More information about the wp-trac mailing list