Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response Variants #60

Open
mizosoft opened this issue Sep 26, 2022 · 0 comments
Open

Response Variants #60

mizosoft opened this issue Sep 26, 2022 · 0 comments

Comments

@mizosoft
Copy link
Owner

mizosoft commented Sep 26, 2022

An HTTP response can nominate a set of headers pertaining to the initiating request, using the Vary header, to be matched against by the incoming request before being served by caches. This makes it possible to have multiple responses per URI (e.g. one for Accept-Encoding: gzip and another for Accept-Encoding: brotli for a Vary: Accept-Encoding). The prospect of implementing this seems nice due to the hypothetical increase in hit rates (the current behavior is to only keep the latest response). However, this makes it tricky to handle some cases like entry locking (lock edits on the entry scope or response scope?) & response updates (knowing which response to update).

A major part of this is re-specifying the Store API to act more like a Map<String, List<Entry>>. Let's prioritize #50 to have a better idea of the implementation concerns of such a change.

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

No branches or pull requests

1 participant