The meaning of X-Cache and X-Cache-Lookup in Squid

  

In the http header of the CDN machine, we often see two parameters of X-Cache and X-Cache-Lookup, then these two What are the meanings of the parameters, and what is the difference.

HTTP/1.0 200 OKExpires: Mon, 23 Jun 2008 09:16:40 GMTCache-Control: max-age=60Content-Type: text/htmlAccept- Ranges: bytesETag: "985899363"Last-Modified: Mon, 23 Jun 2008 08:17:40 GMTContent-Length: 54218Date: Mon, 23 Jun 2008 09:15:40 GMTServer: Microsoft-IIS/7.0Age: 20X-Cache : HIT from cdcnc-253-238X-Cache-Lookup: HIT from cdcnc-253-238:80Via: 1.0 cdcnc-253-238 (squid/3.0.STABLE1-20080201) Connection: close

Do you see it? ? Very strange, HIT means hit, how can there be two hits. X-Cache: In fact, it is the real native HIT and MISS.

X-Cache-Lookup: This is the father, and A query in sibling mode, such as ICP. Such as hit data.


For another situation: HTTP/1.0 200 OKExpires: Mon, 23 Jun 2008 09:16:40 GMTCache-Control: max-age=60Content-Type: text/htmlAccept- Ranges: bytesETag: "985899363"Last-Modified: Mon, 23 Jun 2008 08:17:40 GMTContent-Length: 54218Date: Mon, 23 Jun 2008 09:15:40 GMTServer: Microsoft-IIS/7.0Age: 20X-Cache : MISS from cdcnc-253-238X-Cache-Lookup: HIT from cdcnc-253-238:80Via: 1.0 cdcnc-253-238 (squid/3.0.STABLE1-20080201) Connection: close

harvey brother gives The explanation:

1, the file exceeds the time set by the refresh_p parameter in Squid. When accessing, it will go to the backend verification. At this time, the error is returned: (X-Cache: MISS from cdcnc-253- 238) but found that the backend file is not updated, so Squid continues to use the cache file, the return is hit: X-Cache-Lookup: HIT from cdcnc-253-238:80

2, the client gave A ctrl+f5, but the reload-into-ms is set in the refresh_pattern parameter. At this time, the file will also go to the backend verification, and the same will return miss, but the backend tells the Squid file not to be updated, so sq Uid continues to return from the cache to the client, the return is the hit (X-Cache-Lookup: HIT from cdcnc-253-238:80)

Because my settings are: refresh_pattern www.domian.com 10 0% 60 reload-into-ims expiration time is set very short, so the above explanation may be correct! Verification: 1. Change the parameter to ignore-reload, and surely there are two HIT2. Change to refresh_pattern company.zhaopin.com 1440 0% 2880 reload-into-ims time increases, and surely there are two HIT

Copyright © Windows knowledge All Rights Reserved