Cache Rules - Bypass All Incoming Requests only works Temporarily

What is the name of the domain?

What is the error number?

No error number

What is the error message?

No error message

What is the issue you’re encountering

I have moved a site from GoDaddy and set up to self host at DigitalOcean. I’ve moved Authoritative DNS to Cloudflare, set up a Tunnel and now serving site. Now refactoring site html,css,js. Problem: The original images were 4,5,8, and 12mb in size. The site was loading those oversize files and thus being cached by Cloudflare. I resized the images, added a Cache Rule to bypass all requests and Purged All cache. Uncached images then load instead of the reduced size. Problem is that without removing the Cache Rule, the cached oversize large image files load again. They cannot be from the source server as they no longer exist. So why, if I have not removed the Cache Rule are the old oversize files loading? If I Purge Cache and reload the page, the smaller files load. Give it some time and then the large oversize files load. I don’t understand. Any help appreciated! Thank you

What steps have you taken to resolve the issue?

Added Cache Rule to bypass all requests
Cache Configuration - Purge All

What are the steps to reproduce the issue?

Wait some time and the cached files are served even if Cache Rule still enabled

Correction… When I Purge Cache the smaller files are served from my server. Wait a bit and then the original oversize large image files get served. They have to be being served from Cache as the original files have been reduced.

Can you show a link to the actual files (use </> backticks so the forum software doesn’t show them) and a screenshot of the cache rule?

I’m only being allowed one image per post

After waiting 13 seconds…

Link to one of images with the largest size https://echosoffilm.com/images/little_girl_and_eggs.jpg

The file is not cached by Cloudflare (the cf-cache-status is DYNAMIC) so your rule is overriding the Cloudflare default and making the file ineligible to cache…

curl -i https://echosoffilm.com/images/little_girl_and_eggs.jpg
HTTP/2 200
date: Thu, 26 Dec 2024 15:16:01 GMT
content-type: image/jpeg
content-length: 416006
accept-ranges: bytes
etag: "67698e6c-65906"
last-modified: Mon, 23 Dec 2024 16:23:08 GMT
strict-transport-security: max-age=15552000; includeSubDomains; preload
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=trE877kQSHuWaXmY1z%2FHz7plW4aP7A5oWHD01lUxQ2eUhe6OAlaPihSlXhl%2FahGTat58XUZZjcWdohqBx0mRaJDgXHo76EKnQH3IgZELQGrQyjyKCJdHJLmJqyUzzKOhyOOdr1nY%2F0hA9aKLRa0%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8f820794ba47946c-LHR
alt-svc: h3=":443"; ma=86400
server-timing: cfL4;desc="?proto=TCP&rtt=0&min_rtt=0&rtt_var=0&sent=0&recv=0&lost=0&retrans=0&sent_bytes=0&recv_bytes=0&delivery_rate=0&cwnd=0&unsent_bytes=0&cid=a7b2b1ff84113657&ts=506&x=0"

Then sorry, I don’t understand how a rule to “override” the Cache is in effect overriding the override. Can you please expound? Thank you

Your screenshot doesn’t show the bottom of the cache rule so not sure what you are doing. But that image is not cached by Cloudflare as I showed.

Perhaps I didn’t include enough of the Cache Rule screenshot

Your cache rule is bypassing the cache for all requests to your zone. Cloudflare won’t be caching anything.

But that’s my point. If I load the page, it’s being served the large file sizes. How is that possible if CF is not caching?

I don’t know, there’s no indication in the headers of other caching. You’ll need to see what’s happening on the origin.

But that’s my point… as you can see from the directory listing, those large files don’t exist. Nginx does not have any caching mechanism in place, so the only place, I’m aware, that could be caching is CF. And as I indicated, if I go the Cache Configuration and Purge All, then the smaller files are served. That tells me it is CF that’s caching

As I said, the cf-cache-status: DYNAMIC header tells you it is not.

I get what you’re saying, but then how do you explain the fact that Purging cache then clears the issue?

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