enable conditional and disable max_age by default #1886
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tells browsers to validate cache conditions (etag, last modified, range) rather than using a 12 hour timed cache by default. This fixes the issue where developers who are actively editing or deploying new versions of static files from don't see changes.
Cache-Control: no-cache
by default, orpublic
ifmax_age > 0
.no-cache
doesn't actually mean "don't cache" (that would beno-store
).cache_timeout
tomax_age
. I think this makes it clearer that the parameter directly affects theCache-Control: max-age
value.environ
parameter required. It got added as optional when copying from Flask, but Flask's version would never be called without an activerequest
. Withconditional=True
it's required by default anyway.fixes #1882
CHANGES.rst
summarizing the change and linking to the issue... versionchanged::
entries in any relevant code docs.pre-commit
hooks and fix any issues.pytest
andtox
, no tests failed.