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

WordPress Trac noreply at wordpress.org
Thu Dec 14 18:48:30 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
-------------------------------------+------------------------------

Comment (by westi):

 Some thoughts on the latest patch:

 * It uses two different last_changes values - users and comments - I guess
 some copy paste bug.
 * As mentioned in the original ticket adding caching here is probably not
 going to help at all on busy multi-site installs because the cache will
 continually be invalidated - potentially just adding useless cache set
 traffic both for individual query results and updates to last_changed.
 * I wonder if a better solution to the described problems would be to
 introduce in-memory non-persistent caching for query results so that re-
 running queries in the same page generation will be neutered.
 * Ideally we should add caching only when we can demostrate a functional
 performance improvement not just because we can.

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


More information about the wp-trac mailing list