lukeed / worktop

The next generation web framework for Cloudflare Workers
MIT License
1.66k stars 42 forks source link

Questions regarding caching api #69

Closed StarpTech closed 3 years ago

StarpTech commented 3 years ago

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:

StarpTech commented 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.

lukeed commented 3 years ago

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.

lukeed commented 3 years ago

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.