Always getting cf-cache-status: BYPASS

Hi all,

normally caching works for me, but for this one, for some reason doesnt.

my response headers with properly configured DNS (proxied) and page rule to cache everything (“Cache Level: Cache Everything”) is always getting “cf-cache-status: BYPASS”

Here is my response headers:

$ curl -s -I -X GET ',max-age=10000' --header 'Api-Key: mykey'
HTTP/2 200
date : Sat, 19 Dec 2020 16:27:07 GMT
content-type : application/json; charset=utf-8
set-cookie : __cfduid=d3a551ab964aa1caae364afbbae70378d1608395226; expires=Mon, 18-Jan-21 16:27:06 GMT; path=/;; HttpOnly; SameSite=Lax
x-frame-options : SAMEORIGIN
x-xss-protection : 1; mode=block
x-content-type-options : nosniff
x-download-options : noopen
x-permitted-cross-domain-policies : none
referrer-policy : strict-origin-when-cross-origin
cache-control : max-age=10000, public
set-cookie : osdb_locale=en; path=/; expires=Sun, 19 Dec 2021 16:27:06 -0000
x-request-id : 0555a80b-4c43-4a81-af97-e854b41796e1
x-runtime : 0.313346
x-kong-upstream-latency : 320
x-kong-proxy-latency : 1
x-cache-backend : apigw
x-var-cache : MISS
x-via : fw1
cf-cache-status : BYPASS
set-cookie : languages=en; path=/
set-cookie : country=Mexico; path=/
set-cookie : city=Oaxaca+City; path=/
cf-request-id : 071d6c961f0000b2deb100c000000001
expect-ct : max-age=604800, report-uri=""
report-to : {"endpoints":[{"url":"https:\/\/\/report?s=U%2FM9YZpFQ%2FWXXKtnjDOMKZdC2dRl7hyp0Ajp5tHk417LEJZoDxBVovKOTf4aQbYJHoY94u0ZnGORxlu2D76XhrxVMliwyx10we0w8GqGO0MIbrDzwNdjVf2V"}],"group":"cf-nel","max_age":604800}
nel : {"report_to":"cf-nel","max_age":604800}
server : cloudflare
cf-ray : 60427d369f34b2de-MEX

Any idea what to do to cache this ?

I believe that setting a cookie bypasses the cache. Otherwise, site cookies won’t work.


do you think deleting the setting the cookie will help to it ? Can I read in docs somewhere about it please ?

you are indeed right! deleting the set-cookie header helped. it is caching now! Thanks a lot.


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