Movatterモバイル変換


[0]ホーム

URL:


  1. Home
  2. Reference documentation
  3. HTTP references
  4. HTTP Headers

X-Cache-Hits

List indicating number of cache hits in each node.

Fastly writes this header into responses. It is proprietary to Fastly.

Fastly appends this non-standard header to responses by default, and sets it to the value ofobj.hits.

The hit count is per-cache-server, not per-data-center, and cache hits will not be evenly distributed across cache nodes due toclustering, making this value of very limited use in most cases.

This header may report results from multiple cache servers, ifshielding orNext-gen WAF at Edge is enabled, or if you use custom VCL code that invokes therestart statement.

Other than in the case of arestart, any positive value in this header indicates that the request was satisfied from cache and not forwarded to origin (or Next-gen WAF at Edge)

You can remove this header, or make it subject toFastly-Debug, by using VCL in thevcl_deliver subroutine (after the#FASTLY deliver placeholder in custom VCL, or in a 'deliver' VCL snippet):

if (!req.http.Fastly-Debug) {
unsetresp.http.X-Cache-Hits;
}

[8]ページ先頭

©2009-2025 Movatter.jp