Skip to content

[Workers Runtime] Document cache.put rejection of 301/302 redirects with query strings#30891

Open
jayeve wants to merge 1 commit into
cloudflare:productionfrom
jayeve:jayeve/workers-query-string-cache-put-note
Open

[Workers Runtime] Document cache.put rejection of 301/302 redirects with query strings#30891
jayeve wants to merge 1 commit into
cloudflare:productionfrom
jayeve:jayeve/workers-query-string-cache-put-note

Conversation

@jayeve

@jayeve jayeve commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a note to the Workers Cache API docs explaining that cache.put() silently rejects 301/302 redirect responses when the cache key excludes the query string and the Location header contains it. This is an existing anti-cache-poisoning mitigation that is not currently documented, causing confusion for customers using the Cache API with redirect responses on custom domain Worker routes.

Documentation checklist

…ng is excluded from cache key

**Summary**

Adds a caution callout to the Cache Keys docs explaining that Cloudflare
will not cache 301/302 redirect responses when the cache key excludes
the query string and the Location header contains it. This is an existing
anti-cache-poisoning mitigation that was not previously documented.
Also adds a cross-reference from the Workers Cache API cache.put() docs
to the cache-keys page.
@jayeve jayeve force-pushed the jayeve/workers-query-string-cache-put-note branch from 46767a7 to 33db233 Compare May 27, 2026 23:13
@github-actions

Copy link
Copy Markdown
Contributor

Hey there, we've marked this pull request as stale because there's no recent activity on it. This label helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant).

@github-actions github-actions Bot added the stale label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants