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

Update caching docs now that we're on the CDN #10967

Merged
merged 3 commits into from
Oct 15, 2021

Conversation

diox
Copy link
Member

@diox diox commented Oct 15, 2021

No description provided.

@codecov

This comment has been minimized.

Copy link
Contributor

@bobsilverberg bobsilverberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @diox. I have a couple of questions and a couple of suggestions.

r+wc

docs/caching.md Outdated Show resolved Hide resolved
docs/caching.md Outdated Show resolved Hide resolved
Caching is bypassed if a request comes in with any of the following:

- `frontend_auth_token` cookie (extracted from the Cookie header)
- `disable_caching` query parameter in the URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it no longer possible to disable caching via a query parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this was never re-implemented. Sending a token cookie is enough.


### Cookies in responses

In addition to what's described above, Nginx is currently configured to never cache a response containing the `Set-Cookie` header. This is a safety measure that we could deactivate if needed. The value of the `Set-Cookie` header wouldn't affect the cache key.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the limitation of not being able to set cookies on the server been eliminated with the move to the CDN?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and no. Previously setting cookies would cause the response not to be put in the cache. Now that limitation is gone, but it's potentially dangerous, since the response will be put in the cache with the Set-Cookie that was sent by the origin, so any future client request might get served that response (and those cookies) by the CDN.

@diox diox merged commit d45bb45 into mozilla:master Oct 15, 2021
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.

2 participants