[wp-trac] [WordPress Trac] #55352: Improve cache key generation in WP_Term_Query

WordPress Trac noreply at wordpress.org
Wed Mar 9 10:40:51 UTC 2022


#55352: Improve cache key generation in WP_Term_Query
--------------------------+----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Taxonomy      |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+----------------------------
 Using the WP_Term_Query, caches are generated using the args passed to the
 class instance. However, there are a number of params passed, that would
 not affect the cache but would create a new cache key. Couple of example
 of these are.

 - pad_counts
 - update_term_meta_cache

 These params can be removed from the cache key with no affect to cache.

 There are other params such as slug and term_taxonomy_id, that can be both
 string and array. If all these were convert to arrays, it would improve
 the likelyhood that would be a cache hit.

 There are likely more wins to be had to improve caches here.

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


More information about the wp-trac mailing list