Caching of ESI snippets

Joe Van Dyk joe at fixieconsulting.com
Mon Nov 30 22:18:56 CET 2009


On Mon, Nov 30, 2009 at 1:09 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> In message <c715e640911301255s2edc2984y615ec4e11efc37a at mail.gmail.com>, Joe Van
>  Dyk writes:
>
>>> You browser sends cookies along ?
>>
>>Nope.
>>
>>However, /include has this cache-control: private, max-age=3D0,
>>must-revalidate.  But I wouldn't think that would matter when varnish
>>decides whether or not to request /esi?
>
> Unless Varnish sees that, it will not matter.
>
> Varishlog is, as always, your friend.

Here's the output.  Any chance you could glance at it?  I'm not sure
how to read it yet.

    7 ReqStart     c 127.0.0.1 55655 1181355510
    7 RxRequest    c GET
    7 RxURL        c /main
    7 RxProtocol   c HTTP/1.1
    7 RxHeader     c Host: localhost:8080
    7 RxHeader     c User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac
OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
    7 RxHeader     c Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    7 RxHeader     c Accept-Language: en-us,en;q=0.5
    7 RxHeader     c Accept-Encoding: gzip,deflate
    7 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    7 RxHeader     c Keep-Alive: 300
    7 RxHeader     c Connection: keep-alive
    7 RxHeader     c Cookie:
_esi_session=BAh7BjoPc2Vzc2lvbl9pZCIlMWQxNGY3YjJjNjMyMWE4MjhiZDI2YjNjM2UzNDI5OTU%3D--e429b58563e05452b524f47628cb7d09817f91fb;
s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B
    7 RxHeader     c If-None-Match: "77386a2121be399962e6f8f70e5472a3"
    7 VCL_call     c recv
    7 VCL_return   c pass
    7 VCL_call     c pass
    7 VCL_return   c pass
    9 BackendOpen  b default 127.0.0.1 55707 127.0.0.1 3000
    7 Backend      c 9 default default
    9 TxRequest    b GET
    9 TxURL        b /main
    9 TxProtocol   b HTTP/1.1
    9 TxHeader     b Host: localhost:8080
    9 TxHeader     b User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac
OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
    9 TxHeader     b Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    9 TxHeader     b Accept-Language: en-us,en;q=0.5
    9 TxHeader     b Accept-Encoding: gzip,deflate
    9 TxHeader     b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    9 TxHeader     b Cookie:
_esi_session=BAh7BjoPc2Vzc2lvbl9pZCIlMWQxNGY3YjJjNjMyMWE4MjhiZDI2YjNjM2UzNDI5OTU%3D--e429b58563e05452b524f47628cb7d09817f91fb;
s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B
    9 TxHeader     b If-None-Match: "77386a2121be399962e6f8f70e5472a3"
    9 TxHeader     b X-Varnish: 1181355510
    9 TxHeader     b X-Forwarded-For: 127.0.0.1
    7 Debug        c "tag {include src="/esi" } 0 1 0"
    7 Debug        c "Incl " src="/esi" ""
    9 RxProtocol   b HTTP/1.1
    9 RxStatus     b 200
    9 RxResponse   b OK
    9 RxHeader     b Connection: close
    9 RxHeader     b Date: Mon, 30 Nov 2009 21:17:36 GMT
    9 RxHeader     b Status: 200
    9 RxHeader     b ETag: "974a5bab80a34a131da3a1975e35fc8c"
    9 RxHeader     b X-Runtime: 2
    9 RxHeader     b Content-Type: text/html; charset=utf-8
    9 RxHeader     b Content-Length: 148
    9 RxHeader     b Server: Mongrel 1.1.5
    9 RxHeader     b Cache-Control: private, max-age=0, must-revalidate
    7 ObjProtocol  c HTTP/1.1
    7 ObjStatus    c 200
    7 ObjResponse  c OK
    7 ObjHeader    c Date: Mon, 30 Nov 2009 21:17:36 GMT
    7 ObjHeader    c Status: 200
    7 ObjHeader    c ETag: "974a5bab80a34a131da3a1975e35fc8c"
    7 ObjHeader    c X-Runtime: 2
    7 ObjHeader    c Content-Type: text/html; charset=utf-8
    7 ObjHeader    c Server: Mongrel 1.1.5
    7 ObjHeader    c Cache-Control: private, max-age=0, must-revalidate
    9 BackendClose b default
    7 TTL          c 1181355510 RFC 0 1259615856 0 0 0 0
    7 VCL_call     c fetch
    7 VCL_info     c XID 1181355510: obj.prefetch (-30) less than ttl
(-1.25962e+09), ignored.
    7 VCL_return   c deliver
    7 Length       c 148
    7 VCL_call     c deliver
    7 VCL_return   c deliver
    7 TxProtocol   c HTTP/1.1
    7 TxStatus     c 200
    7 TxResponse   c OK
    7 TxHeader     c Status: 200
    7 TxHeader     c ETag: "974a5bab80a34a131da3a1975e35fc8c"
    7 TxHeader     c X-Runtime: 2
    7 TxHeader     c Content-Type: text/html; charset=utf-8
    7 TxHeader     c Server: Mongrel 1.1.5
    7 TxHeader     c Cache-Control: private, max-age=0, must-revalidate
    7 TxHeader     c Transfer-Encoding: chunked
    7 TxHeader     c Date: Mon, 30 Nov 2009 21:17:36 GMT
    7 TxHeader     c X-Varnish: 1181355510
    7 TxHeader     c Age: 0
    7 TxHeader     c Via: 1.1 varnish
    7 TxHeader     c Connection: keep-alive
    7 VCL_call     c recv
    7 VCL_return   c pass
    7 VCL_call     c pass
    7 VCL_return   c pass
    9 BackendOpen  b default 127.0.0.1 55708 127.0.0.1 3000
    7 Backend      c 9 default default
    9 TxRequest    b GET
    9 TxURL        b /esi
    9 TxProtocol   b HTTP/1.1
    9 TxHeader     b Host: localhost:8080
    9 TxHeader     b User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac
OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
    9 TxHeader     b Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    9 TxHeader     b Accept-Language: en-us,en;q=0.5
    9 TxHeader     b Accept-Encoding: gzip,deflate
    9 TxHeader     b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    9 TxHeader     b Cookie:
_esi_session=BAh7BjoPc2Vzc2lvbl9pZCIlMWQxNGY3YjJjNjMyMWE4MjhiZDI2YjNjM2UzNDI5OTU%3D--e429b58563e05452b524f47628cb7d09817f91fb;
s_sess=%20s_cc%3Dtrue%3B%20s_sq%3D%3B
    9 TxHeader     b If-None-Match: "77386a2121be399962e6f8f70e5472a3"
    9 TxHeader     b X-Varnish: 1181355510
    9 TxHeader     b X-Forwarded-For: 127.0.0.1
    9 RxProtocol   b HTTP/1.1
    9 RxStatus     b 200
    9 RxResponse   b OK
    9 RxHeader     b Connection: close
    9 RxHeader     b Date: Mon, 30 Nov 2009 21:17:36 GMT
    9 RxHeader     b Status: 200
    9 RxHeader     b ETag: "e9ce710e9b09175301008aa45d94f96f"
    9 RxHeader     b X-Runtime: 2
    9 RxHeader     b Content-Type: text/html; charset=utf-8
    9 RxHeader     b Content-Length: 83
    9 RxHeader     b Server: Mongrel 1.1.5
    9 RxHeader     b Cache-Control: max-age=60, public
    7 ObjProtocol  c HTTP/1.1
    7 ObjStatus    c 200
    7 ObjResponse  c OK
    7 ObjHeader    c Date: Mon, 30 Nov 2009 21:17:36 GMT
    7 ObjHeader    c Status: 200
    7 ObjHeader    c ETag: "e9ce710e9b09175301008aa45d94f96f"
    7 ObjHeader    c X-Runtime: 2
    7 ObjHeader    c Content-Type: text/html; charset=utf-8
    7 ObjHeader    c Server: Mongrel 1.1.5
    7 ObjHeader    c Cache-Control: max-age=60, public
    9 BackendClose b default
    7 TTL          c 1181355510 RFC 60 1259615856 0 0 60 0
    7 VCL_call     c fetch
    7 VCL_return   c deliver
    7 Length       c 83
    7 VCL_call     c deliver
    7 VCL_return   c deliver
    7 ReqEnd       c 1181355510 1259615856.047472000
1259615856.069441080 6.975047112 0.021866083 0.000102997
    7 ReqEnd       c 0 1259615856.069535017 1259615856.069535017
0.000093937 0.000000000 0.000000000
    0 StatAddr     - 127.0.0.1 0 3277 63 130 0 113 153 43622 18571



More information about the varnish-dev mailing list