Disable cache on worker's subrequest

How to disable cache on worker’s subrequest (that is, when you call fetch() )?

Maybe try:

await fetch(request { cf: { cacheTtl: 0 } })

There’s currently no way to bypass cache on a fetch() to a static asset from within worker code. We’re in the process of implementing a way to do so, but in the meantime a workaround is to set a Page Rule for the route in question.

Note that that doesn’t truly bypass the cache – it still checks to see if an asset is cached and returns it if so. It’s only when the asset is not found in the cache that the cacheTtl feature will make a difference. That may be enough for @256462034b’s use case, of course.