Our site uses APO. I am setting custom Edge Cache TTL using the Cloudflare-CDN-Cache-Control at the origin for certain types of content based on some custom logic on our side.
In my Cloudflare-CDN-Cache-Control header, I’m sending max-age and stale-if-errror.
I read on these forums that stale-if-error is built into APO. If that is true, what is the default stale-if-error duration? If I send max-age via Cloudfare-CDN-Cache-Control, does the default stale-if-error duration persist? And I assume I can send a different value for stale-if-error if I want to change the default?
This hasn’t been documented anywhere I could find.
Though APO will ignore Cache-Control from the origin (see FAQs), sending Cloudflare-CDN-Cache-Control or CDN-Cache-Control directives is a documented way of fine tuning your caching under APO. (Documented perhaps in a non-intuitive place. Please check the last paragraph here: Page Rule integration with APO · Cloudflare Automatic Platform Optimization docs)