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

Support for multiple representations for a URL #112

Open
dasch opened this issue Apr 23, 2015 · 5 comments
Open

Support for multiple representations for a URL #112

dasch opened this issue Apr 23, 2015 · 5 comments

Comments

@dasch
Copy link

dasch commented Apr 23, 2015

In some cases it makes sense to have multiple resources for the same URL, e.g. one for logged-in and one for anonymous users. I believe the spec supports this, as e.g. If-None-Match can contain a list of ETags.

I propose the following change:

  1. Rather than merely selecting the first matching cache entry for a request, get all matching entries.
  2. If one of them is still fresh, respond with that immediately.
  3. Otherwise – if they all need to be validated – collect the ETags and pass them all to the application in If-None-Match.
  4. If the application responds with 304, select the entry with the ETag found in the 304 response.

This would allow the application to control exactly what is returned to the client.

@dasch
Copy link
Author

dasch commented Apr 23, 2015

(Also, I'd be happy to implement this if you agree with the design.)

@grosser
Copy link
Collaborator

grosser commented Oct 2, 2015

@rtomayko

@ioquatix
Copy link

ioquatix commented Nov 5, 2015

Boop +1

@grosser
Copy link
Collaborator

grosser commented Nov 5, 2015

Sounds good ... @dasch want to make a PR ? ( I'm the maintainer now 😭 )

@dasch
Copy link
Author

dasch commented Nov 6, 2015

@grosser we've switched to caching with Nginx in the meantime :-x I probably won't have time to look at this in the short term, but it shouldn't be too difficult.

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

3 participants