Modify Edge Cache TTL based on response header

Is there a way to modify the Edge Cache TTL based on a response header? Example: If our origin server returns a 404 error or the header access-control-expose-headers:X-Cld-Error, we would like to have the TTL check be different than if the page returns a 200 response without the above header.

The cache-control header handles this. If “Edge Cache TTL” is set to ‘respect existing headers’ (either globally or via a page rule), it will respect the cache-control header.

One thing I’m not sure about is if CF will cache 404 errors, I assume CF will if cache-control is public but I can’t say for sure.

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