[wp-trac] [WordPress Trac] #14983: Get cache object by field

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 28 09:21:50 UTC 2010


#14983: Get cache object by field
-------------------------+--------------------------------------------------
 Reporter:  johnbillion  |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Performance  |     Version:                 
 Severity:  normal       |    Keywords:                 
-------------------------+--------------------------------------------------

Comment(by johnbillion):

 Replying to [comment:2 scribu]:
 > I was also trying to make get_term_by() check the cache in #13170 but I
 like your approach better.
 >
 > Some testing would be required, to see if this actually boosts
 performance in most cases or not.
 It only loops over the cache objects for the corresponding group so it
 should be fairly quick.

 My use case was where some tags were manually listed in the footer of a
 site. The code uses `get_term_by()` but performs a query even though the
 terms are already displayed on the site and are in cache. Not sure where
 and how often `get_term_by()` is used by default.

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


More information about the wp-trac mailing list