Some CF servers do not always update cache with new query string


#1

Hi!
I have problems with cache updating (maybe ‘busting’ - I’m not english speaker, so can use wrong determinations, sorry) on some CF servers.
It occurred many times. But not every time. Maybe one of ten.
So. When I was trying to update cache using query string: …?v=02 => …?v=03, I got next result:

  • on most CF servers cache was updated
  • but on some - it was not. And every time those ‘some’ are the same: cf-ray: 38e2a201f9178b16-KBP and WAW server (unfortunately I didn’t save full header of that cases). The css/js/etc. files got from those servers on new URL (with changed value of query parameter) some times did not update. When I change the value of parameter once more - update happened.

Is it incorrect configuration of specific CF servers? Or I can fix it myself?


#3

And you have your caching here set correctly for Standard? No Page Rules that change it?


#4

I think so… Unfortunately I’m not the administrator… I’m just front-end developer in a company. And this issue makes my life more difficult. Because after every deployment I need to reload updated pages many times to check if changing files updated on all CF servers correctly (the responses to my requests time to time come from Frankfurt (FRA), Warsaw (WAW) or KBP (I’m not sure about it’s location). With FRA there we no problems. And with KBP and WAW they occur time to time. And I think if problem is on our configuration, it occurs every time?

Also problem is: I can not be sure about other hundreds CF servers.
I know about other ways of cache breaking (and use it on some our projects), but they are less comfortable.


#5

Cloudflare POPs use airport codes, so KBP = Boryspil International Airport = Kiev, Ukraine. I I think @sdayman asked the essential question, it would be useful to know what the cache settings are for the domain in question. The caching behavior for Cloudflare varies based on these settings.

If the caching is set to ignore query string then the object is treated the same regardless of the query string and the object won’t be refreshed until it’s current cache TTL expires. That sounds like the behavior you’re seeing, so it’s possible that is the case.

Please also ask your administrator to see what page rules exist, as it is possible to override the global setting for certain paths and the Global setting may not match what is being applied to a particular path.


#6

KBP = Boryspil International Airport = Kiev, Ukraine

As I thought. Thanks)

If the caching is set to ignore query string then the object is treated the same regardless of the query string and the object won’t be refreshed until it’s current cache TTL expires. That sounds like the behavior you’re seeing, so it’s possible that is the case.
Please also ask your administrator to see what page rules exist, as it is possible to override the global setting for certain paths and the Global setting may not match what is being applied to a particular path.

But how it explains, that on the most CF servers all OK? And every time, when problem occured, one more change of query string always help.

Let me describe the example of situation…

I edit CSS.
Change ‘path/style.css?v=23’ to ‘path/style.css?v=24’ on my HTML.
We deploy it on our server.
And in few seconds:
a) on FRA the page always OK;
b) on KBP and WAW (maybe somewhere else - I can write only for my requests) sometimes page OK, and sometimes NO - because there is old CSS file on link ‘path/style.css?v=24’. If now I open this CSS (with JavaScript files situation is the same) in browser (let’s suppose we got it from KBP. I have this situation both from KBP and WAW in real) and change 24 on 25 in URL, I see the changing of file content - because now NEW version of file is loaded. And the header cf-ray stay the same: KBP.