- 🇳🇿New Zealand ericgsmith
I.e. if a page contains a view with exposed filters, each filter's machine name will be present in response cache contexts list as `url.query_args:`
Are we sure this premise is true? I'm just trying this patch on an existing project and don't see this.
I've got a view with exposed filters, which exposes a taxonomy term with the url query param "type". When I apply this patch and debug the cache contexts I see the more generic
url.query_args
context is present but nothing specific for type - there is nourl.query_args:type
. I don't know if that is optimized away at some point or if views isn't adding it - I have not debugged further. With the current patch its then leaves type in the$query_params
and the returnsNULL
, incorrectly skipping this page from the registry.I need to test this on a clean install / check where cache contexts get optimized as query param garbage is a huge problem for me too / this module and am super interested in solutions to this problem.
- 🇳🇿New Zealand ericgsmith
On further investigation - I don't think views is smart enough to add all the specific contexts as the issue summary describes, I can only see it adding the full url context here https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/views...