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

Cache and Request objects #624

Closed
annevk opened this issue Feb 16, 2015 · 5 comments
Closed

Cache and Request objects #624

annevk opened this issue Feb 16, 2015 · 5 comments

Comments

@annevk
Copy link
Member

annevk commented Feb 16, 2015

It's not entirely clear to me how this works right now. E.g. does keys() always return clones? (The text for keys() is most certainly wrong.)

I think that perhaps we should introduce RequestKey or some such and introduce a mixin that Request and RequestKey can share. And ways to create a RequestKey from a Request (and vice versa?). That way caches never have to deal with request that has an associated body.

@wanderview
Copy link
Member

Is it reasonable to leave off the Request body if we want to support POST methods in the Cache in the future?

See this previous comment from @jakearchibald:

#550 (comment)

@jakearchibald
Copy link
Contributor

does keys() always return clones?

Yeah.

That way caches never have to deal with request that has an associated body.

I've heard people ask for a way to store post requests, especially if (a clone) failed to complete, maybe indexedDB is a better place for these, although you run into the same clones issue.

@wanderview
Copy link
Member

They just want to store the POST requests, but not match on them?

@jakearchibald
Copy link
Contributor

Yeah, that's another reason for them to not be in the cache

@annevk
Copy link
Member Author

annevk commented Feb 16, 2015

Since the cache does not support anything but GET and HEAD, and Request does not support bodies for GET and HEAD, I think we would only need to revisit this issue if we ever change one of those invariants.

@annevk annevk closed this as completed Feb 18, 2015
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