我在使用Cloudflare的服務器上的資源上運行curl
,因爲它是CDN。但是,我不確定它是否緩存。Cloudflare - 無CF緩存狀態 - 緩存與否?
下面是從A
輸出 - 這是一個我不知道的緩存:
Resource A:
< HTTP/1.1 530
< Date: Wed, 22 Mar 2017 12:47:06 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: close
< Set-Cookie: __cfduid=<numbers>; expires=Thu, 22-Mar-18 12:47:05 GMT; path=/; domain=.<domain>; HttpOnly
< Cache-Control: max-age=6
< Expires: Wed, 22 Mar 2017 12:47:12 GMT
< X-Frame-Options: SAMEORIGIN
< Server: cloudflare-nginx
< CF-RAY: <numbers>-LHR
Resource B:
- 這顯然是緩存,因爲它有一個CF-Cache-Status: HIT
頭
< HTTP/1.1 200 OK
< Date: Wed, 22 Mar 2017 12:47:56 GMT
< Content-Type: image/png
< Content-Length: 3853
< Connection: keep-alive
< Set-Cookie: __cfduid=<numbers>; expires=Thu, 22-Mar-18 12:47:56 GMT; path=/; domain=<domain>; HttpOnly
< Cf-Bgj: imgq:100
< Cf-Polished: pngoptimizer, origSize=5384
< Etag: "<etag>"
< Last-Modified: Fri, 17 Mar 2017 00:07:20 GMT
< X-Amz-Id-2: <numbers>=
< X-Amz-Meta-S3b-Last-Modified: 20170316T132941Z
< X-Amz-Request-Id: <numbers>
< CF-Cache-Status: HIT
< Expires: Wed, 22 Mar 2017 13:47:56 GMT
< Cache-Control: public, max-age=3600
< Server: cloudflare-nginx
< CF-RAY: <numbers>-LHR
注意我已經多次運行這些curl
請求。
有什麼建議嗎?
Cloudflare始終使用高速緩存,除非您已啓用'developer mode',這將禁用高速緩存。 – Jer