How to cache workers responses (with R2 backend)

I’m building a static hexo website using following scheme: → → →

I find that each visit of my site triggers workers & r2 class B operations.
Is there some way to cache response of files like “” ?

note: I’m using worker js file in official documentation with http authentication.

You can use the Workers Cache API, yes! The cache APIs won’t work on, but will absolutely work on

GitHub - kotx/render: Cloudflare Worker to proxy and cache requests to R2 is a great example of combining R2 with Cache. And then is the documentation for cache specifically.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.