[wp-trac] [WordPress Trac] #21760: get_term_by() calls are not cached

WordPress Trac noreply at wordpress.org
Mon Oct 27 00:11:54 UTC 2014


#21760: get_term_by() calls are not cached
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  4.1
Component:  Taxonomy        |     Version:  2.3
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------------

Comment (by tollmanz):

 [https://core.trac.wordpress.org/attachment/ticket/21760/21760.12.diff
 21760.12.diff] combines the changes @nacin made with his other
 suggestions, which include:

 * Removing md5 hashes (seems to be consistent with how similar strings are
 handled in WP)
 * Attempts to use a more sane grouping convention. It borrows from the
 user caching and adds the incrementor to the key
 * I also noticed that the incrementor was only used with the name and slug
 caches. I added the incrementor to the term object cache as well, but
 perhaps I am missing some reason why this isn't a good idea.

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


More information about the wp-trac mailing list