Trouble understanding Varnishlog

. gmoniey at gmail.com
Wed Dec 29 00:27:08 CET 2010


I setup a simple rule in the my VCL to cache requests to a url, however,
according to the X-Varnish header, the requests are not being cached. So I
fired up varnishlog, and it confused me to see that it said there was a
'hit'.

Can someone explain why the object is not being returned as a cached object?
I'm confused around the fact that it says there is a 'hit', but the
X-Varnish header only has 1 field.

I read that if the Set-Cookie header is sent, then varnish does not cache
the object, but I'm pretty sure thats not being sent. Is there another rule
I'm missing? Thanks.

Here is an excerpt of the log:

  15 SessionOpen  c 10.0.19.23 59326 :80
  15 ReqStart     c 10.0.19.23 59326 1001168302
  15 RxRequest    c GET
  15 RxURL        c /items?xzy=true
  15 RxProtocol   c HTTP/1.1
  15 RxHeader     c Host: XYZ
  15 RxHeader     c User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1
  15 RxHeader     c Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  15 RxHeader     c Accept-Language: en-us,en;q=0.5
  15 RxHeader     c Accept-Encoding: gzip,deflate
  15 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  15 RxHeader     c Keep-Alive: 115
  15 RxHeader     c Connection: keep-alive
  15 RxHeader     c Cookie: __qca=P0-707762352-1283409801091;
__utma=182775871.333345873.1284063320.1293103561.1293171223.24;
__utmz=182775871.1284063320.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
km_lv=x; km_ai=T7R0VpZshcfDBJiF4n8Edt1vrrI; km_uq=; __utmv=182775871.p
  15 RxHeader     c If-None-Match: "4ee85970d12afd8992d3dc1651f07b9d"
  15 VCL_call     c recv
  15 VCL_return   c lookup
  15 VCL_call     c hash
  15 VCL_return   c hash
  15 Hit          c 1001168004
  15 VCL_call     c hit
  15 VCL_return   c deliver
  15 VCL_call     c deliver
  15 VCL_return   c deliver
  15 TxProtocol   c HTTP/1.1
  15 TxStatus     c 304
  15 TxResponse   c Not Modified
  15 TxHeader     c Date: Tue, 28 Dec 2010 23:19:53 GMT
  15 TxHeader     c Via: 1.1 varnish
  15 TxHeader     c X-Varnish: 1001168302
  15 TxHeader     c Cache-Control: private, max-age=0, must-revalidate
  15 TxHeader     c ETag: "4ee85970d12afd8992d3dc1651f07b9d"
  15 TxHeader     c Connection: keep-alive
  15 Length       c 0
  15 ReqEnd       c 1001168302 1293578393.040635109 1293578393.040782928
0.000112057 0.000097990 0.000049829
  15 Debug        c "herding"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101228/129cab27/attachment-0003.html>


More information about the varnish-misc mailing list