Page Rule : Does an Edge Cache TTL apply to 404?


I setup a page rule to increase cache for downloading binaries. I put Cache Level to Everything and Edge Cache TTL to one day. It looks like the TTL apply to answer regardless the origin status code, is that correct ?

If I want to decrease Cache TTL for a 404, am I forced to use worker ?
I just have a look to worker and it create its own URL but I can add route for existing worker, but I’m not sure that the call to Cache API apply to the new route I’ve add. And should I delete page rule and replace it by the Worker call ?

Thank you for your time

No. 404s are cached for three minutes when no cache-control directive or expires response header are present. Provide a proper Response header and you should be fine.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.