Cf cache bypass suddenly appear

I got these headers:

access-control-allow-origin: *
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
cache-control: public, max-age=31536000, immutable
cf-cache-status: BYPASS

have checked other issues related to cache, they mentioned about page rules and server’s cache-control policy. My server return cache-control: public, max-age=31536000, immutable, so I thought there is no problem with that?

I’ve just added the first page rules today, seems the cache is still not working.
How to make the cache works again?

It is a bit difficult to debug right now as your server is barely responding and requests show a timeout.

Anyhow, one request went through and it seems as if you sent a cookie. Cookies generally bypass the cache. Remove the user_sid cookie and check if it caches in that case.

@sandro thanks for your response, is there any complete documentation on the cookies will bypass the cache?
I used that cookie to manage loggedin users, and at the beginning I’m using CF, it works fine both the cache and that cookie.
Somehow after 2nd January, cache is not working eventhough no significant changes on cookies related…

Did you try to remove the cookie?

yes, but I still get cf-cache-status: BYPASS on header after I clear my cookie

Clear? You need to remove it from your server. You cant send it.

already removed and redeploy to my server, but still get cf-cache-status: BYPASS, please help…

I still get the cookie.

Also, your server certificate expired two weeks ago. You should fix that too.

wait let me check

You actually seem to try and remove it by setting a past date, however the cookie still is there.


Hi @sandro, can you please help to check again? I’ve redeployed to my server, but now the header change to become cf-cache-status: MISS. Is there anything else?

Cookie still there, now you are actually setting it.

You can actually check it yourself in the response.

I couldn’t see set-cookie like previous version in my response header:

access-control-allow-origin: *
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
cache-control: public, max-age=86400
cf-cache-status: MISS
cf-ray: 56df1b555cb1cbec-SIN
content-encoding: br
content-type: application/javascript; charset=UTF-8
date: Tue, 03 Mar 2020 00:05:36 GMT
etag: W/"1af56-1709d81c748"
expect-ct: max-age=604800, report-uri=""
last-modified: Mon, 02 Mar 2020 23:08:13 GMT
server: cloudflare
status: 200
vary: Accept-Encoding
x-content-type-options: nosniff
x-powered-by: Express

how do you find the cookie still there?

Seems the cache already work back. Thank you for your help @sandro!

Hi @sandro, I still need your help, I got cf-cache-status: MISS and seems the cache is no longer work when I take a look on my dashboard.

Some files still got HIT, but my index page got MISS. what is the meaning of these values and what causing cache to be missed?

MISS is simply when the resource is not in the cache, the subsequent request typically should be a HIT again. I just checked and the second request was marked as HIT.

second request you mean webpack file? but my index and app always get miss. How can I improve these two files to be cache by CF?

No, second request to Cloudflare. Once Cloudflare purges it from the cache it will be a MISS and subsequent requests will re-cache it.

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