[wp-trac] [WordPress Trac] #52710: Taxonomy: Make it possible to bypass automatic caching of results in `get_terms()`
WordPress Trac
noreply at wordpress.org
Tue Feb 1 23:39:13 UTC 2022
#52710: Taxonomy: Make it possible to bypass automatic caching of results in
`get_terms()`
----------------------------------------+------------------------------
Reporter: dlh | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 2.3
Severity: normal | Resolution:
Keywords: needs-unit-tests has-patch | Focuses: performance
----------------------------------------+------------------------------
Comment (by peterwilsoncc):
I'll post a review on the PR.
I noticed the argument `cache_domain` was added in [18128] for #13318 but
apparently never used in the `wp_cache_*()` function calls.
Reading the ticket, it seems that this was to allow `get_terms()` to use a
custom domain so plugin developers could change the domain used by
`WP_Term_Query` if they wished to make it non-persistent without affecting
the domain used for term objects. This accounts for the issue @dlh
identifies in the comment above.
I could also be completely misunderstanding the purpose of the ticket and
`cache_domain` was intended to be affect the hash generated for the cache
key.
Rabbit holes down the rabbit holes...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52710#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list