Can a HIT still touch the origin server for re-validation?

I see a slow loading / slow TTFB of the cover image and logo on this page:

When I inspect the requests from Chrome dev tools, I see this:

cache-control: max-age=31536000
cf-cache-status: HIT

Is it possible that Cloudflare, despite the fact that returns HIT, is still contacting S3 (where images are stored) in order to verify that are not changed?

In case, how can I verify that? How can I avoid that?

Images are loading in 40-130ms for me and were served from Cloudflare’s cache.

CF may occasionally request the origin if it is no longer in the cache or the cache has expired. If you see a HIT in the CF-Cache-Status header it was indeed served from the Cloudflare servers and did not hit S3.

If you were to see EXPIRED, REVALIDATED or similar then it means it hit S3

Thanks for the reply!

So if CF sends an etag (in order to revalidate) to the origin server I would always see REVALIDATED and not HIT?

HIT status won’t contact your origin. You can look at your Cache Analytics and even filter down to specific image or image extension to see CF edge server cache status i.e. to filter on just .png images cache status


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