🤕 clumsy.dev 🚀

Cloudflare Workers Caching (API)

cloudflare workerscacheworkers

Cloudflare Workers Caching (API)

Workers Endpoints

this is using the cache API, creating a cacheKey based on the URL, and should always result in a cache HIT:

curl -sX GET -I https://cache.clumsy.dev/ | grep -E "cf-cache-status|cache-control"

this uses fetch() with the {cf: { cacheEverything: true }} object, and should result in a HIT, even with cache-control: no-store:

curl -sX GET -I https://cache.clumsy.dev/everything | grep -E "cf-cache-status|cache-control"

this uses fetch() with a custom cacheTtl, removing a custom language=en header and removing the cache-control: no-store header from the origin's response and should also result in a HIT:

curl -sX GET -I https://cache.clumsy.dev/cookie | grep -E "cf-cache-status|cache-control|set-cookie"