[wp-trac] [WordPress Trac] #29894: get_terms() isn't caching - duplicate queries generated
WordPress Trac
noreply at wordpress.org
Thu Oct 9 02:22:14 UTC 2014
#29894: get_terms() isn't caching - duplicate queries generated
------------------------------------------+-----------------------------
Reporter: webgeekconsulting | Owner: boonebgorges
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 4.0
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: performance
------------------------------------------+-----------------------------
Comment (by boonebgorges):
> What if we were to create an object cache of the underlying query
itself? Then, repeat calls to get_terms() that would use the same query,
but use the data differently (e.g. the fields parameter) would use use the
object cache instead of another query against the database.
Yeah, I was thinking of something similar while looking at this. It's
pretty poor caching strategy to store the same data in the cache 5 or 6
separate times (for different values of 'fields'). If we can fix that,
it'd be a bonus.
BTW, I got verification from a lead that we don't have to worry about
maintaining old cache keys. Feel free to mix it up :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29894#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list