[wp-trac] [WordPress Trac] #21760: get_term_by() calls are not cached
WordPress Trac
noreply at wordpress.org
Thu Oct 16 04:44:15 UTC 2014
#21760: get_term_by() calls are not cached
----------------------------+-----------------------------
Reporter: wonderboymusic | Owner: wonderboymusic
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.1
Component: Taxonomy | Version: 2.3
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
----------------------------+-----------------------------
Changes (by wonderboymusic):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"29915"]:
{{{
#!CommitTicketReference repository="" revision="29915"
Cache `get_term_by()` calls:
* Add a helper function, `wp_get_last_changed()`, to retrieve a last-
modified timestamp by cache group
* When caching a term, also make cache entries for slug and name via
`slug:{$term_id}` and `name:{$term_id}` keys in the
`$taxonomy:$last_changed` bucket that reference the term_id
* In `clean_term_cache()` and `update_term_cache()`, respect
`$_wp_suspend_cache_invalidation`
* Original term cache entries maintain BC
Adds unit tests.
Props wonderboymusic, tollmanz, boonebgorges.
Fixes #21760.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21760#comment:53>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list