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

Breaking change: Set appropriate disallow/allow status codes by default. #179

Open
GuySartorelli opened this issue Nov 29, 2023 · 1 comment

Comments

@GuySartorelli
Copy link
Member

#172 adds configuration to disallow specific status codes from being cached.

In most scenarios, you don't want 404 pages to be cached. There may be other status codes that we also don't want cached by default such as 500, 403, etc... we should add those by default to the disallow list for CMS 6. Alternatively, we could add a new allow list to only allow caching 200 and redirect responses by default.

Notes

  • People will want to change this configuration - so make sure to add a key that can be overridden, and filter the config with array_filter() to remove empty values. This means in projects people can effectively unset a default status code by setting its value to null.
@maxime-rainville
Copy link
Contributor

Finding out that a resource is missing is not always a trivial thing. And normally it should be missing for everyone. It sounds like something we would want to cache.

Agree that 500, 403 and 401 should NOT be cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants