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).
Part of a broader RFC 10008 adoption effort: https://github.com/jeswr/http-query-adoption
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 inCache.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).
Part of a broader RFC 10008 adoption effort: https://github.com/jeswr/http-query-adoption