If the Cache-Control header is set to "private", "no-store", "no-cache", or "max-age=0", or if there is a cookie in the response, then Cloudflare will not cache the resource.
Otherwise, if the Cache-Control header is set to "public" and the "max-age" is greater than 0, or if the Expires headers are set any time in the future, we will cache the resource.
Note: As per RFC rules, "Cache-Control: max-age" trumps "Expires" headers. If we see both and they do not agree, max-age wins.
愛注意
maxAge
有正確設置,因為預設值是0
(也就是說預設會讓 Caching 關閉)。See: https://support.cloudflare.com/hc/en-us/articles/202775670-How-Do-I-Tell-Cloudflare-What-to-Cache-
CF-Cache-Status: HIT
See: https://support.cloudflare.com/hc/en-us/articles/200169556-How-can-I-tell-if-Cloudflare-is-caching-my-site-or-a-specific-file-
如何快取全站?
*example.com/*
如何快取全站,但排除管理頁面部分?
*example.com/admin/*
)的 Cache Level 為 Bypass*example.com/*
原始文章
https://support.cloudflare.com/hc/en-us/articles/200172256-How-do-I-cache-static-HTML-