Hmm..So essentially the browser cache is preventing Varnish from returning the result. This definitely makes sense, but I could have sworn that the X-Varnish header does not show up when I attempt the same request from a different browser. <div>
<br></div><div>It seems regardless of the scenario, even if I clear my browser cache on the current page, I cannot get the X-Varnish header to show 2 values. I will keep digging, and see if I can come up with a test case.<br>
<br><div class="gmail_quote">On Tue, Jan 11, 2011 at 8:48 AM, Lucas Brasilino <span dir="ltr"><<a href="mailto:lucas.brasilino@gmail.com">lucas.brasilino@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<div class="im"><br>
> Can someone explain why the object is not being returned as a cached object?<br>
<br>
</div>Because your client is performing a conditional request and so<br>
revalidating using<br>
If-None-Match/Etag headers the already cached object in your machine.<br>
<br>
Your client is issuing:<br>
<div class="im"><br>
> 15 RxHeader c If-None-Match: "4ee85970d12afd8992d3dc1651f07b9d"<br>
<br>
</div>It means: please send me the object if none match with this Etag value.<br>
<br>
Varnish responds:<br>
<div class="im"><br>
> 15 TxStatus c 304<br>
> 15 TxResponse c Not Modified<br>
[...]<br>
</div>> 15 TxHeader c ETag: "4ee85970d12afd8992d3dc1651f07b9d"<br>
<br>
It means: the object you have is the same one I have.<br>
<br>
Transfering an object you already have is a waste of resources :)<br>
<br>
regards<br>
<font color="#888888">Lucas Brasilino<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
> I'm confused around the fact that it says there is a 'hit', but the<br>
> X-Varnish header only has 1 field.<br>
> I read that if the Set-Cookie header is sent, then varnish does not cache<br>
> the object, but I'm pretty sure thats not being sent. Is there another rule<br>
> I'm missing? Thanks.<br>
> Here is an excerpt of the log:<br>
> 15 SessionOpen c 10.0.19.23 59326 :80<br>
> 15 ReqStart c 10.0.19.23 59326 1001168302<br>
> 15 RxRequest c GET<br>
> 15 RxURL c /items?xzy=true<br>
> 15 RxProtocol c HTTP/1.1<br>
> 15 RxHeader c Host: XYZ<br>
> 15 RxHeader c User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X<br>
> 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1<br>
> 15 RxHeader c Accept:<br>
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br>
> 15 RxHeader c Accept-Language: en-us,en;q=0.5<br>
> 15 RxHeader c Accept-Encoding: gzip,deflate<br>
> 15 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7<br>
> 15 RxHeader c Keep-Alive: 115<br>
> 15 RxHeader c Connection: keep-alive<br>
> 15 RxHeader c Cookie: __qca=P0-707762352-1283409801091;<br>
> __utma=182775871.333345873.1284063320.1293103561.1293171223.24;<br>
> __utmz=182775871.1284063320.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);<br>
> km_lv=x; km_ai=T7R0VpZshcfDBJiF4n8Edt1vrrI; km_uq=; __utmv=182775871.p<br>
> 15 RxHeader c If-None-Match: "4ee85970d12afd8992d3dc1651f07b9d"<br>
> 15 VCL_call c recv<br>
> 15 VCL_return c lookup<br>
> 15 VCL_call c hash<br>
> 15 VCL_return c hash<br>
> 15 Hit c 1001168004<br>
> 15 VCL_call c hit<br>
> 15 VCL_return c deliver<br>
> 15 VCL_call c deliver<br>
> 15 VCL_return c deliver<br>
> 15 TxProtocol c HTTP/1.1<br>
> 15 TxStatus c 304<br>
> 15 TxResponse c Not Modified<br>
> 15 TxHeader c Date: Tue, 28 Dec 2010 23:19:53 GMT<br>
> 15 TxHeader c Via: 1.1 varnish<br>
> 15 TxHeader c X-Varnish: 1001168302<br>
> 15 TxHeader c Cache-Control: private, max-age=0, must-revalidate<br>
> 15 TxHeader c ETag: "4ee85970d12afd8992d3dc1651f07b9d"<br>
> 15 TxHeader c Connection: keep-alive<br>
> 15 Length c 0<br>
> 15 ReqEnd c 1001168302 1293578393.040635109 1293578393.040782928<br>
> 0.000112057 0.000097990 0.000049829<br>
> 15 Debug c "herding"<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
> <a href="http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br></div>