[wp-trac] [WordPress Trac] #13318: Bug caching get_terms

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 1 23:06:27 UTC 2011


#13318: Bug caching get_terms
-------------------------------------------------+-------------------------
 Reporter:  djudorange                           |       Owner:
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  3.2
Component:  Taxonomy                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch reporter-feedback dev-     |
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by ryan):

 The reason we use defaults instead of args is so that functions that call
 get_terms() and pass an args array that contains the arguments for both
 the calling function and for get_terms() will map to the same cache bucket
 for the same query.  When all args are used to form the cache key, calls
 to get_terms() that result in the same query aren't usually cached to the
 same place.  With custom_cache_key using all arguments,  get_terms() calls
 with it set likely won't cache to the same place for the same query.
 Probably not a big deal, but it tempts me to go with mfields' original
 suggestion with something like  'cache_domain' => 'core' added to defaults
 and letting callers pass 'cache_domain' => 'custom-domain'  if they need
 their own cache namespace.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13318#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list