You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support caching HTTP QUERY (RFC 10008) responses, keyed on the request body #6849
RFC 10008 defines QUERY — a safe, idempotent, cacheable HTTP method carrying a request body whose content defines the query. Per §2.7, a QUERY response is cacheable and the cache key MUST incorporate the request content (not just method + URL + Vary).
Today the Cache API (caches.default, Cache.match() / Cache.put()) is GET-oriented and does not cache QUERY responses keyed on the request body, so a Worker cannot serve a QUERY result from cache — which is the main advantage of QUERY over POST-as-read.
Ask: support caching QUERY responses with a key derived from the request body (+ Content-Type) per §2.7 — e.g. allow QUERY in Cache.match() / Cache.put() with the request body folded into the key (buffering it before key computation, with a size cap and a cache-bypass fallback for unbuffered bodies). The managed edge cache is the natural follow-on; the Cache API contract is the piece workerd owns.
Context: RFC 10008 was co-authored by a Cloudflare engineer (James M. Snell), so there is likely natural interest here. A reference implementation of a body-aware QUERY cache key exists in Node's undici (nodejs/undici), and server-side support is emerging (Eclipse Jetty, Apache Tomcat).
I’d love to take a swing at implementing this. I’ve read the contribution guidelines and know that workerd prioritizes internal architecture, so I wanted to propose a high-level approach and get your blessing on the design before I start writing any C++.
Given that @jasnell co-authored RFC 10008, I'm hoping this aligns well with Cloudflare's broader vision.
Activity
Utsav7428 commentedon Jul 3, 2026
Hi team,
I’d love to take a swing at implementing this. I’ve read the contribution guidelines and know that workerd prioritizes internal architecture, so I wanted to propose a high-level approach and get your blessing on the design before I start writing any C++.
Given that @jasnell co-authored RFC 10008, I'm hoping this aligns well with Cloudflare's broader vision.
Utsav7428 commentedon Jul 4, 2026
I have implemented the initial phase of support for the HTTP QUERY method (RFC 10008) as discussed. You can track the progress in the following PR:
PR: #6857
Scope: Phase 1 & 2 (API boundary, routing, and telemetry).
Status: Draft (ready for architectural review).
I am now beginning the investigation for Phase 3 (Request body streaming). Feedback on the current PR is appreciated.