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

Allow options to bubble upstream, support 304s. #30

Closed
wants to merge 2 commits into from

Conversation

joshwlewis
Copy link
Contributor

On a V1 model, when doing something like Comment.all(post, { cache: true }), $.ajax() doesn't get the cache option passed to it. This means we can't use the ETag/If-None-Match caching built into ajax on APIs that support it. There is also a ifModified option for $.ajax() with similar functionality that doesn't get sent up through RestModel V1.

Additionally, when an ETag is still valid, we don't need to update the cached response. In both V1 and V2, we now abort processing and updating in the case of 302 (not modified) responses.

@joshwlewis
Copy link
Contributor Author

Ported over from #26.

@joshwlewis
Copy link
Contributor Author

Oops, duplicate.

@joshwlewis joshwlewis closed this Jul 14, 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

Successfully merging this pull request may close these issues.

1 participant