Cloudflare 不缓存文件,即使 headers 是 "Cache-Control: public, max-age=86400"

Cloudflare not caching files even when headers are "Cache-Control: public, max-age=86400"

当我使用 curl 命令时,所有 headers 都是正确的,但文件未缓存为

CF-Cache-Status: MISS

由 curl 命令显示。

> < HTTP/1.1 200 OK < Date: Sat, 02 Jun 2018 05:57:28 GMT <
> Content-Type: image/png < Content-Length: 2293 < Connection:
> keep-alive < Set-Cookie:
> __cfduid=d3cf179afd212660124585350d19e88c81527919048; expires=Sun, 02-Jun-19 05:57:28 GMT; path=/; domain=.mayan.cf; HttpOnly <
> X-Powered-By: Express < Accept-Ranges: bytes < Cache-Control: public,
> max-age=86400 < Last-Modified: Fri, 01 Jun 2018 15:39:06 GMT < ETag:
> W/"8f5-163bc009a0c" < CF-Cache-Status: MISS < Expires: Sun, 03 Jun
> 2018 05:57:28 GMT < Server: cloudflare < CF-RAY: 4247aec4300930f6-SIN
> <  { [1905 bytes data]
> * Connection #0 to host mayan.cf left intact

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.

https://support.cloudflare.com/hc/en-us/articles/202775670-How-Do-I-Tell-Cloudflare-What-to-Cache-

Cloudflare 仅根据请求使用一些试探法来尝试猜测内容是静态(可缓存)还是动态。如果它在请求时猜错了,它就不会缓存响应。您可以通过将 Page Rule "Cache Level" 设置为 "Cache Everything" 来禁用此启发式——然后 Cloudflare 将假定响应将始终可缓存。

尝试设置该页面规则,看看是否有帮助。