Cache Status MISS with AWS S3

Hi all, I have a worker that proxies aws s3 private static content: SVGs, PNGs, JPGs e.g. nothing fancy.

The problem is I’m always getting CF-Cache-Status: MISS. Though S3 response contains Cache-Control: max-age=86400. I’ve tried to add Cache-Control: public, max-age=86400. Nothing has changed.

I’ve redefined cf options on response.

  return await fetch(url, {
    cf: {
      cacheEverything: true,
      cacheTtl: 14400,
      cacheKey: cacheKey

Also I’ve created similar page rule with Cache-Level: Everything and Edge TTL: 4 hours for a good measure. I’m not sure that page rules can be applied simultaneously with workers though.

Maybe there is something I’ve missed?

You could consider using the Cache API (supports using your own cacheKey as well):

Thanks, sounds great. But I’m not sure about additional price cost.

So short update.

Indeed, Cache API did the trick.

Also, templates gallery was quite useful Examples · Cloudflare Workers docs