- Issue created by @markwittens
I am having a similar issue, though with different steps to reproduce.
Steps to reproduce
- Create an endpoint with a default include
- Make sure Drupal cache is enabled
- Clear the cache (and ensure max-age on cache on below requests has also expired)
- Request the created endpoint without any includes eg /jsonapi/node/page?include=
- Request the created endpoint as default eg /jsonapi/node/page and see that it is serving the response without includes from previous step
This issue seems to have been introduced with 🐛 Pages with default includes are not cached Fixed in v3.25. If I roll back to 3.24 the issue is not present.
- 🇳🇱Netherlands bbrala Netherlands
Ok, so what i understand.
/jsonapi/node/page?include=
: A page with includes cleared.is cached the same as
/jsonapi/node/page
: A page with default includes.That indeed seems like a regression. We should able to test that pretty easily in this test somewhere:
- 🇳🇱Netherlands bbrala Netherlands
Tried to reproduce in tests, couldn't reproduce the first case (IS) but seems i can reproduce the second case by @cb_dewr.
- Status changed to Needs review
4 months ago 8:26am 12 July 2024 - 🇳🇱Netherlands bbrala Netherlands
I think this is fixed now. Problem was indeed the difference of `include=` versus no include paramter at all. I would love a review on this, perhaps test this patch on your site.