Skip to content

HTTP cache support for the QUERY method (RFC 10008)#852

Merged
ok2c merged 2 commits into
apache:masterfrom
hunghhdev:master
Jul 21, 2026
Merged

HTTP cache support for the QUERY method (RFC 10008)#852
ok2c merged 2 commits into
apache:masterfrom
hunghhdev:master

Conversation

@hunghhdev

Copy link
Copy Markdown
Contributor

Follow-up to #840. The caching layer can now store and serve responses to QUERY requests: cache keys incorporate a digest of the request content and content type, and both classic and async interceptors buffer QUERY bodies instead of bypassing the cache. Anything that cannot be buffered safely still falls back to direct execution.

@ok2c

ok2c commented Jul 17, 2026

Copy link
Copy Markdown
Member

@hunghhdev Awesome! Out of curiosity is this effort coordinated with the original author of #840 or is it purely coincidental?

Please note there is #850 that still needs to land that improves the process of cache key generation.

Overall looks very good.

@desiderantes

desiderantes commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

@hunghhdev Awesome! Out of curiosity is this effort coordinated with the original author of #840 or is it purely coincidental?

Please note there is #850 that still needs to land that improves the process of cache key generation.

Overall looks very good.

No, this PR was not coordinated, I just saw this. If you prefer this code instead, I can stop #846.

@ok2c

ok2c commented Jul 18, 2026

Copy link
Copy Markdown
Member

No, this PR was not coordinated, I just saw this. If you prefer this code instead, I can stop #846.

@desiderantes This is the first time we, as a project, have multiple contributions of the same feature. I suggest we proceed with @hunghhdev contribution as it is almost complete and it is a first-time contribution. In the meantime, if you have time and inclination what also needs to be done is to extend HttpCacheEntry and the related factory and serializer to store request body along with the request head.

@ok2c

ok2c commented Jul 19, 2026

Copy link
Copy Markdown
Member

@hunghhdev Very good. Please re-base off the latest master and update the cache key generation logic

@hunghhdev

Copy link
Copy Markdown
Contributor Author

@hunghhdev Very good. Please re-base off the latest master and update the cache key generation logic

Rebased off the latest master

@ok2c ok2c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hunghhdev Looks good. I will merge this change-set tomorrow if I hear no objections.

@ok2c
ok2c merged commit fbc962c into apache:master Jul 21, 2026
10 checks passed
@ok2c

ok2c commented Jul 21, 2026

Copy link
Copy Markdown
Member

@hunghhdev Many thanks for this contribution! There is still one more thing that needs to be done: HttpCacheEntry and related classes should be extended to include the request body if given. Unless @desiderantes has already started working on this change.

@hunghhdev

Copy link
Copy Markdown
Contributor Author

@hunghhdev Many thanks for this contribution! There is still one more thing that needs to be done: HttpCacheEntry and related classes should be extended to include the request body if given. Unless @desiderantes has already started working on this change.

Thanks for merging! I'll take the HttpCacheEntry extension as a follow-up. @desiderantes hope you don't mind me picking this one up too

ok2c pushed a commit that referenced this pull request Jul 21, 2026
* HTTP cache support for the QUERY method (RFC 10008)

* Do not buffer QUERY request content larger than 25 KB; require the enclosed entity to be repeatable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants