docs: show what each Cache-Control directive actually does - #145
Merged
Merged
Conversation
The directive table marked header-only directives as simply supported and described them with the spec's wording. Show how each one is set, whether it is sent, and its effect on the server-side cache, and document that the request's own Cache-Control is ignored by design. Tone down the README claims of comprehensive / complete directive support. Closes #143
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #143
Changes
docs/HTTP_CACHING.md: the Cache-Control table now has these columns: directive, how to set it, whether it is sent in the header, and its effect on the server-side cache.public,immutable,must-revalidate,stale-while-revalidateandstale-if-errorare marked header-only.@cachecannot emit are listed with no setting.no_cache/no_storereplace the rest of the header, and links to Cache flow.Cache-Controlis ignored": it documents that client request directives such asno-cacheandmax-age=0do not bypass the cache. This is by design, because otherwise any client could send every request to the handler.If-None-Matchis still honoured.docs/README.zh-TW.md: the same table and note, in Traditional Chinese. The claim that the directives are completely implemented ("完整實現 Cache-Control 指令") is replaced.README.md: "comprehensive HTTP caching support" becomes a concrete description.Adding the directives that
@cachecannot emit yet is tracked in #144.Verification
zensical build --strictpasses, and the table renders with all 13 directives.Cache-Control: no-cacheandmax-age=0request headers still get the cached response.no_store=Trueresponses carry no ETag.