Does stale-while-revalidate works when max-age is 0

What is the name of the domain?

uncivserver.xyz

What is the issue you’re encountering

I am using max-age: x and stale-while-revalidate: y where y = 5x. But in my case x might not really matter, what I really want is some value of y. But I am concerned if y will really work of x is 0 as I read somewhere that max-age: 0 means proxy will not cache it at all so any revalidation have to be done. want to know of this is true.

Hi,

Thank you for reaching out to us.

If you set the Cache-Control header to max-age=0 Cloudflare will understand that the origin server is instructing to bypass cache, you may check this here: Cloudflare cache responses · Cloudflare Cache (CDN) docs

You can, however, specify when to serve stale content: CDN-Cache-Control · Cloudflare Cache (CDN) docs

Also, you can revivew our documentation regarding cache here:

I hope this helps.

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