Cf-cache-status MISS and HIT for images on S3

So I got a bunch (thousands) of images hosted on AWS S3 bucket. And I followed the guide to do CNAME and everything is working.

However, my problem is some of the images got cf-cache-status: HIT and some of the images got cf-cache-status: MISS

Why?

Here is the one got HIT

accept-ranges: bytes
age: 1542
cache-control: max-age=14400
cf-bgj: imgq:100,h2pri
cf-cache-status: HIT
cf-polished: origSize=89617, status=webp_bigger
cf-ray: 75a110c33f40e7f7-DFW
content-length: 58427
content-type: image/jpeg
date: Fri, 14 Oct 2022 14:39:37 GMT
etag: "f3592e2cae8e49106b75bdfe95cb57a9"
last-modified: Thu, 13 Oct 2022 21:43:44 GMT
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=T8Y3K0S8n8iqKuuf%2Fjdcl9PuT4yQqYlnPNrL5e6%2F4LBKP3ltX092bDMxlNBkitPkEG%2FQpk8F2Dtk7p8Fx8YfLKmFh%2Br5Zgqsxge7pyBVMebPYs2hRSDCYFOuMb9tmH0opSryXyCR%2FKOXTQY1D7tQQBg%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
vary: Accept-Encoding
x-amz-id-2: 2iYx6GzjuuSsskDLepgm5NjTiSNysF7M0tphel3Ey6uPEbRRGE0qbS4+wL0Zj1G4yMbtF3XtmMY=
x-amz-meta-s3b-last-modified: 20191215T191933Z
x-amz-meta-sha256: 713a7ea26f7219aecb1b50b857478f2f04f63de919593b64bdff09b85a7494ad
x-amz-request-id: 5YRG7GM0N0PFH1M6

and here is the one got MISS

accept-ranges: bytes
cache-control: max-age=14400
cf-cache-status: MISS
cf-ray: 75a110c33f3ee7f7-DFW
content-length: 27242
content-type: image/jpeg
date: Fri, 14 Oct 2022 14:39:37 GMT
etag: "d33c9f5ce8d1d9196fa43a4e7ef6f0b6"
last-modified: Thu, 13 Oct 2022 21:43:20 GMT
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=0ef3kSc%2FxcHTC2WQsa%2FV8sanrfeGYb%2BFjUwCploLNHifJnGMrBwRJjQ7IA5ElbdZxnySgfGOWk6pbEQLc3xrj3jLuzfNclV19bS5Wg%2Fq1vKggDwaUzllwUj9PsmQU5KXiqVYsAw8IMgiZ9DhCk%2B1Or4%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
vary: Accept-Encoding
x-amz-id-2: 14TtpzNqSEpDTevAM7nKhnkcVULw2bSr8crMNm3O6tk17fC+SF7mBr31S5XEaFZiPIM9yoSiyiU=
x-amz-request-id: XWMG1VRXJTTEAE2X

cf-cache-status: MISS just means the resource wasn’t in the cache for that particular request.

The most common situation would simply be that the resource hasn’t been requested recently enough that it would be sitting in the cache at this moment.

2 Likes

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