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-Control on API GET calls #337

Closed
pnorman opened this issue Jul 16, 2013 · 2 comments
Closed

Cache-Control on API GET calls #337

pnorman opened this issue Jul 16, 2013 · 2 comments

Comments

@pnorman
Copy link
Contributor

pnorman commented Jul 16, 2013

Currently the API sends a Cache-Control: max-age=0, private, must-revalidate header in node responses. RFC2616 gives the meaning of private as

Indicates that all or part of the response message is intended for a single user and MUST NOT be cached by a shared cache. This allows an origin server to state that the specified parts of the response are intended for only one user and are not a valid response for requests by other users. A private (non-shared) cache MAY cache the response.

whereas public is

Indicates that the response MAY be cached by any cache, even if it would normally be non-cacheable or cacheable only within a non- shared cache. (See also Authorization, section 14.8, for additional details.)

Given the nature of the GET API calls, public seems like a better fit.

@tomhughes
Copy link
Member

Given the max-age=0 whether it is public or private is irrelevant as it always has to refetch the object anyway.

@pnorman
Copy link
Contributor Author

pnorman commented Jul 20, 2013

Good point. We're currently sending no-cache on deleted and missing nodes, should we send the same as for found nodes?

@pnorman pnorman closed this as completed Jul 30, 2013
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

2 participants