[wp-trac] [WordPress Trac] #35075: Comment cache ignores custom query vars
WordPress Trac
noreply at wordpress.org
Thu Jan 7 16:26:56 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: needs-patch | Focuses: performance
-----------------------------+--------------------------
Comment (by jason_the_adams):
Replying to [comment:11 boonebgorges]:
> OK. It would also be nice to have unit tests demonstrating that the
cache is sensitive to custom query vars.
I went to write the test, and interestingly enough, I found an "inverse"
test in tests/comment/query.php:
test_comment_cache_key_should_ignore_custom_params which relates to
#22400. I see that @wonderboymusic added the `wp_array_slice_assoc` in
[28460].
This tests asserts that only one query is performed when a custom
query_var is introduced, when I would assert that there should be two.
What's the protocol in this case? Should I modify/remove the existing
test?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35075#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list