Open GuySartorelli opened 12 months ago
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.
https://github.com/silverstripe/silverstripe-staticpublishqueue/issues/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
array_filter()
to remove empty values. This means in projects people can effectively unset a default status code by setting its value tonull
.