我有一些音频文件,比如 mp3, m4a 等,希望第一次请求后 CF 能尽可能帮我缓存,我设置的是半年缓存,但是我发现可能第二天就 MISS 了,不知道哪里出了问题,文件一直没动过,提供信息如下,不知道有没有有经验的大佬帮我看看,万分感谢!
CURL 结果
HTTP/2 200
date: Mon, 16 Jan 2023 08:00:58 GMT
content-type: audio/mpeg
content-length: 2627556
etag: "63c188d3-2817e4"
last-modified: Fri, 13 Jan 2023 16:37:39 GMT
cache-control: max-age=14400
cf-cache-status: MISS
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=z1bJnzMFzjrERFER6bsl0OTPqCr%2Fc0djZDg17QEr%2BoL2cD7D0Fdasfwbo1kBhTFcZrkqP3O0DhbUUGK6yv84TmfTOrZprFkGnaKc88anWs%2Brs0YJ3CkO3tpKqG6o0LB87ODxOj8Q%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 78a55209cd6efb30-SJC
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
HTTP/2 200
date: Mon, 16 Jan 2023 08:13:19 GMT
content-type: audio/mpeg
content-length: 4586558
etag: "63c188d4-45fc3e"
last-modified: Fri, 13 Jan 2023 16:37:40 GMT
cache-control: max-age=14400
cf-cache-status: HIT
age: 634
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=C8C9yoDQaOz6RSjlb1yuTxdQQB6L0F6au4%2FxaswidIQruGd5OGq3Y8lw4Iz2OKnSCVq6mIhxHWRcarZBIbDUFXA%2FAzkGOgaoRmVuMc%2B%2B18tt8o1JF5r%2F9SMPXsXxKmYqBD24Ig%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 78a564275be6fac2-SJC
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
CF 设置
1
gam2046 2023-01-16 16:53:48 +08:00
https://community.cloudflare.com/t/how-long-cloudflare-keeps-cached-files/10282/5
从这里可以得出结论,你设置的值,并不会完全遵守,而会依据命中率与热度,自行调整。 |