[wp-trac] [WordPress Trac] #29894: get_terms() isn't caching - duplicate queries generated

WordPress Trac noreply at wordpress.org
Sun Oct 12 05:26:48 UTC 2014


#29894: get_terms() isn't caching - duplicate queries generated
----------------------------------------+-----------------------------
 Reporter:  webgeekconsulting           |       Owner:  boonebgorges
     Type:  defect (bug)                |      Status:  accepted
 Priority:  normal                      |   Milestone:  Future Release
Component:  Taxonomy                    |     Version:  4.0
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:  performance
----------------------------------------+-----------------------------
Changes (by webgeekconsulting):

 * keywords:  needs-patch needs-unit-tests => needs-unit-tests has-patch


Comment:

 Replying to [comment:12 boonebgorges]:
 > Yeah, I was thinking of something similar while looking at this. It's
 pretty poor caching strategy to store the same data in the cache 5 or 6
 separate times (for different values of 'fields'). If we can fix that,
 it'd be a bonus.
 Take a peek at the latest patch [attachment:taxonomy.php.update4.patch].
 Instead of caching the terms, we can create a cache of the query object.
 Then when the query gets executed, select all possible columns allowing
 the code later on to filter out the fields returned (this is already being
 done anyways). I think this actually simplifies things quite a bit. :)

 What do you think?

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


More information about the wp-trac mailing list