[wp-trac] [WordPress Trac] #35075: Comment cache ignores custom query vars
WordPress Trac
noreply at wordpress.org
Mon Jan 11 02:23:58 UTC 2016
#35075: Comment cache ignores custom query vars
-----------------------------+--------------------------
Reporter: jason_the_adams | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5
Component: Comments | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-----------------------------+--------------------------
Comment (by boonebgorges):
@nacin Thanks for chiming in. Your comment articulates my vague
discomfort.
The underlying problem here is that we're deciding which params should be
used when building the cache key by looking at the `$defaults` array, but
custom params are not included in that array. So another strategy is to
let plugin developers "register" their custom params, by passing the
defaults through a filter. See [attachment:35075.2.diff].
I admit that this approach is not super straightforward from a developer's
point of view. That's why [attachment:35075.2.diff] adds a detailed
description of the issue in the docblock of each affected function.
As long as we continue to allow arbitrary args to be passed to the
function, and allow them to affect the query via various filters, I think
this is about as close as we can get to building an "API" for
"registering" "official" parameters. Thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35075#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list