[Workers] Correct and expand Workers Caching docs#31149
Open
zaidoon1 wants to merge 2 commits into
Open
Conversation
Round of corrections and additions based on review against pingora-origin and edgeworker cache-handler source. Corrections: - Responses with no Cache-Control are cached by default via RFC 9111 heuristic freshness; the docs previously said the opposite. Add a table of the 10 default-cacheable status codes and their TTLs. - s-maxage, must-revalidate, and proxy-revalidate disable both stale-while-revalidate and stale-if-error, not just s-maxage with SWR. - no-cache caches with zero freshness rather than bypassing. Document the EXPIRED, REVALIDATED, and UPDATING outcomes precisely. - x-forwarded-scheme rule was reworded incorrectly; restored. Additions: - Request collapsing section with the 20s cache lock. - stale-if-error section, including the default (infinite) and the carve-out for s-maxage / must-revalidate / proxy-revalidate. - 520-526 and 206 are never cached, even with explicit Cache-Control. - Cache Deception Armor activation conditions for the heuristic- freshness path. - GET and HEAD share a single cache entry; HEAD on a cold cache is converted to GET internally. - Custom RPC methods and WebSocket upgrades bypass the cache. - Cloudflare-Workers-Version-Key request header is part of the cache key. - Cache-Tag character set (printable ASCII), 1024 chars per tag, 1000 tags per response, case-insensitive purge matching, silent drop of invalid tags. - Standardized the Cf-Cache-Status value list across files. - tags and pathPrefixes can be combined in a single purge() call. - Cf-Cache-Status: STALE debugging section.
Review✅ No style-guide issues found in commit CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Address style guide warnings from the cloudflare-docs-bot review on PR cloudflare#31149: - Replace directional words ('table below', 'listed above') with direct references. - Replace 'doesn't' with 'does not'. - Replace 'see [link]' with 'refer to [link]' in newly added text. - Remove 'Note that' filler. - Break a semicolon-joined sentence into two.
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.
Round of corrections and additions based on review against pingora-origin and edgeworker cache-handler source.
Corrections:
Additions:
Summary
Screenshots (optional)
Documentation checklist