Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
cache system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2017 at 15:25 UTC
Updated:
8 Apr 2022 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerInteresting, do you mind writing a test for that?
Comment #3
berdirYes, this is clearly a bug and a test would be good.
That said, are you sure your block really needs to vary by *all* cookies? If you have any sort of tracking or ads on your site then you will end up with unique cache contexts for every visitor.
Comment #4
gaëlg@Berdir: actually I already changed my code to vary by one cookie only, as the bug made me think a bit more. I guess it's a very rare need to vary by all cookies. Thank you anyway. About tests, I'm not used to writing tests and I have not much time to work on this.
Comment #13
vijaycs85Here is the test and combined patch...
Comment #14
vijaycs85Comment #15
vijaycs85Comment #17
longwaveFix and test looks OK to me.
Comment #18
alexpottCommitted fd664f7 and pushed to 9.4.x. Thanks!
Discussing with other committers about when to backport this to 9.3.x
Comment #21
alexpottCherry picked this to 9.3.x. It's not disruptive and fixes a bug.