Page Rule Caching not working

Hello
Trying to get Cloudflare cache images stored on AWS S3 and served with Cloudfront.
All images have cache headers

My Page Rule is
Cache Level - cache everything
Edge Cache TTL - 1 month
Origin Cache Control - on (i tried it with “off” and it didn’t work either)

Here’s the response headers:
cache-control
public, max-age= 604800, s-maxage= 604800
content-length
23906
content-type
webp
date
Wed, 10 Aug 2022 16:27:55 GMT
etag
“1591e67e48dc3571c610debffaca05c9”
last-modified
Sat, 06 Aug 2022 15:32:25 GMT
server
AmazonS3
via
1.1 2f58b5586b40002efa57d2542863b53e.cloudfront.net (CloudFront)
x-amz-cf-id
OOcZf7b0mO5UNxGJqXF67esT4QFbuLV0PIv2bAkrCIxla-EfGY9TtA==
x-amz-cf-pop
IAD66-C2
x-cache
Hit from cloudfront

I do not see cf- headers at all

Please advice
THanks
Igal

Are using custom domain for cloudfront? Did you add it to Cloudflare or proxy it

Page rule is not required, Cloudflare will cache it

Yes, it’s a custom domain on Cloudfront. Does not matter if I set DNS only or Proxy.
I see no cf- headers

You can try it yourlelf:
curl -I https://images-beta.tossdown.com/images/0025e32c-b595-4262-8e50-2bb5aeed9fde.jpg

Keep it to proxy mode

It is in PROXY mode, and not caching


Try disable cache in network tab of chrome if you are using that

I just saw it in CURL
It took more than two hours to actually start working

1 Like

So, you are saying that with PROXY I don’t need any Page Rules?

Yes boss!! Because Cloudflare will cache it

1 Like

Thank you!

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