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

WordPress Trac noreply at wordpress.org
Sun Sep 10 14:49:56 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:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+------------------------------
Changes (by spacedmonkey):

 * keywords:   => has-patch needs-testing
 * version:   => 3.1


Comment:

 My first patch adds basic caching. It add cache invalidation for user
 meta, adding users to blogs and CRUD functions for users.

 This changes all queries to be ids, get the whole user object. Then for
 fields queries, just pick off the fields out of the WP_User object that
 you want.

 Other big change is to the `cache_users` function. This function is very
 similar to `_prime_<type>_cache` function. I have added new param to
 `cache_users` of `$update_meta_cache` to optionally prime user meta
 caches.

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


More information about the wp-trac mailing list