`worktop/cache` POST requests
See original GitHub issuehttps://developers.cloudflare.com/workers/examples/cache-post-request
worktop
already sets Cache-Control
to private, no-cache
so a good solution may be to apply POST caching when this header gets modified.
Main use case for this is to cache GraphQL queries
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Caching POST requests - Varnish Software Documentation
When a user logs in to a site, or provides some unique or private information, this will be done through a POST request....
Read more >Cache POST requests · Cloudflare Workers docs
Cache POST requests using the Cache API. async function sha256(message) { ... Hash the request body to use it as a part of...
Read more >Caching HTTP POST Requests and Responses
The solution is to digest the POST body (along with a few headers), append the URL with the digest, and use this digest...
Read more >Allow post caching · Issue #2615 · GoogleChrome/workbox
Developers should be able to cache post requests as get requests using cacheKeyWillBeUsed . Currently there is a check that prevents post ...
Read more >how to cache response of a POST request using workbox
Let me clarify S. Esteves' answer. Browser cache storage doesn't has an ability to persist POST requests as a keys (see spec here)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With the changes in the next release, the above example can be consolidated into this:
With the latest changes in
worktop@next
, this snippet (https://github.com/lukeed/worktop/issues/53#issuecomment-840825730) changes a little bit.Now
Cache.reply
returns aModule.Worker
definition (object), and there’s no method that does thelookup
->save
sequence for you, but it’s pretty straightforward & it’s more configurable now too: