Closed StarpTech closed 3 years ago
The first point can be closed. Caching works only on custom domains. See https://discordapp.com/channels/@me/871869782448799775/872529828681756732
stale-if-error=60
still doesn't work.
This is the link that was shared: https://developers.cloudflare.com/workers/runtime-apis/cache
3rd paragraph states *.workers.dev
deployments do not have access to Cache APIs.
Closing as unrelated to worktop
Not sure if you ever found an answer to the stale-while-revalidate
aspect. If so, lemme know :) Otherwise, still lemme know so that I can poke around for answers.
Hi, as stated in https://github.com/StarpTech/GraphCDN/blob/main/src/index.ts I wrap all my handler with the Cache API. Currently, there is only one GET route. Questions:
cache-control: public, max-age: 60, stale-if-error=60
directive and my worker throws or returns500
, the handler doesn't respond with a stale result. According to https://developers.cloudflare.com/workers/runtime-apis/cache#headers all directives are supported.