Cf-cache-status MISS if not same device

I think I have a strange behavior.

When I change device to connect to my website the cache is always set to MISS the first time (then HIT on refresh).

Here is a request on redbot:

HTTP/1.1 200 OK
Date: Fri, 06 Mar 2020 09:48:10 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d2c26331e63eb9d5ab1f629694eb5a3fa1583488089;
    expires=Sun, 05-Apr-20 09:48:09 GMT; path=/;
    domain=.mysite.com; HttpOnly; SameSite=Lax; Secure
Vary: Accept-Encoding
Vary: Cookie, Accept-Encoding, Accept-Language
Content-Language: en
Cache-Control: public, max-age=604800
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Content-Type-Options: nosniff
CF-Cache-Status: MISS
Expect-CT: max-age=604800, report-uri="https://report-
    uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 56fb28ccfbd7ed57-SJC

Same url via Curl:

curl -s -X GET -I https://www.mysite.com
HTTP/1.1 200 OK
Date: Fri, 06 Mar 2020 09:59:58 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d88a8b7260fc76fb94e8465272b8e13cb1583488784; expires=Sun, 05-Apr-20 09:59:44 GMT; path=/; domain=.mysite.com; HttpOnly; SameSite=Lax; Secure
Vary: Accept-Encoding
Vary: Cookie, Accept-Encoding, Accept-Language
Content-Language: en
Cache-Control: public, max-age=604800
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Content-Type-Options: nosniff
CF-Cache-Status: MISS
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 56fb39c95b76b78d-CDG

My question is:
Is there a way to tell CF to serve the same cached page no matter the device ?

Kind regards,

It is not a device issue, these two requests went via different datacentres (San Jose and Paris) and hence different caching statuses.

Also the first request was not a different device on your network. It seems to have been an online service altogether.

2 Likes

mmm ok, so it makes requests depending on country ?

I tryed from 2 different servers in France and it HITted the cache, and you’re right if I try from different location (country) it MISSed the cache.

Thanks !

Requests are usually routed to the nearest datacentre (thats the whole point of anycast) and these will be different if you check from different locations.

Ok, understand, thank you.

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