$ cat cgi-bin/date-5.cgi #!/usr/local/bin/perl use DateTime; print "Content-Type: text/html; charset=iso-8859-1\nCache-Control: max-age=5\n\n"; print DateTime->now(); print "\n"; $ ./date-5.cgi Content-Type: text/html; charset=iso-8859-1 Cache-Control: max-age=5 2008-05-09T18:01:05 $ ./date-20.cgi Content-Type: text/html; charset=iso-8859-1 Cache-Control: max-age=20 2008-05-09T18:01:12 $ lwp-request -U -s -e http://localhost:9138/cgi-bin/date-20.cgi GET http://localhost:9138/cgi-bin/date-20.cgi User-Agent: lwp-request/2.08 200 OK Cache-Control: max-age=20 Connection: close Date: Fri, 09 May 2008 18:02:31 GMT Via: 1.1 varnish Age: 0 Server: Apache Content-Length: 20 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 09 May 2008 18:02:30 GMT Client-Peer: 127.0.0.1:9138 Client-Response-Num: 1 P3P: CP="IND NON DSP PHY ONL UNI FIN PUR COM INT DEM CNT STA PRE POL CUR ADMa PSAo PSDo IVAo IVDo CONo OUR", policyref="http://localhost:9138/w3c/p3p.xml" X-Varnish: 1887710906 2008-05-09T18:02:31 $ lwp-request -U -s -e http://localhost:9138/cgi-bin/date-5.cgi GET http://localhost:9138/cgi-bin/date-5.cgi User-Agent: lwp-request/2.08 200 OK Cache-Control: max-age=5 Connection: close Date: Fri, 09 May 2008 18:03:13 GMT Via: 1.1 varnish Age: 0 Server: Apache Content-Length: 20 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 09 May 2008 18:03:13 GMT Client-Peer: 127.0.0.1:9138 Client-Response-Num: 1 P3P: CP="IND NON DSP PHY ONL UNI FIN PUR COM INT DEM CNT STA PRE POL CUR ADMa PSAo PSDo IVAo IVDo CONo OUR", policyref="http://localhost:9138/w3c/p3p.xml" X-Varnish: 1887710907 2008-05-09T18:03:13 $ cat html/test_esi.html This document will use the default TTL.

Here is an ESI include with a five second timeout:
Here is an ESI include with a twenty second timeout: $ lwp-request -U -s -e http://localhost:9138/test_esi.html GET http://localhost:9138/test_esi.html User-Agent: lwp-request/2.08 200 OK Connection: close Date: Fri, 09 May 2008 18:16:12 GMT Via: 1.1 varnish Age: 0 ETag: "cc135-10d-18c031c0" Server: Apache Content-Type: text/html; charset=iso-8859-1 Last-Modified: Fri, 09 May 2008 18:09:19 GMT Client-Date: Fri, 09 May 2008 18:16:12 GMT Client-Peer: 127.0.0.1:9138 Client-Response-Num: 1 Client-Transfer-Encoding: chunked P3P: CP="IND NON DSP PHY ONL UNI FIN PUR COM INT DEM CNT STA PRE POL CUR ADMa PSAo PSDo IVAo IVDo CONo OUR", policyref="http://localhost:9138/w3c/p3p.xml" X-Varnish: 1887710915 This document will use the default TTL.

Here is an ESI include with a five second timeout: 2008-05-09T18:16:12
Here is an ESI include with a twenty second timeout: 2008-05-09T18:16:12 $ lwp-request -U -s -e http://localhost:9138/test_esi.html GET http://localhost:9138/test_esi.html User-Agent: lwp-request/2.08 200 OK Connection: close Date: Fri, 09 May 2008 18:16:14 GMT Via: 1.1 varnish Age: 2 ETag: "cc135-10d-18c031c0" Server: Apache Content-Type: text/html; charset=iso-8859-1 Last-Modified: Fri, 09 May 2008 18:09:19 GMT Client-Date: Fri, 09 May 2008 18:16:14 GMT Client-Peer: 127.0.0.1:9138 Client-Response-Num: 1 Client-Transfer-Encoding: chunked P3P: CP="IND NON DSP PHY ONL UNI FIN PUR COM INT DEM CNT STA PRE POL CUR ADMa PSAo PSDo IVAo IVDo CONo OUR", policyref="http://localhost:9138/w3c/p3p.xml" X-Varnish: 1887710916 1887710915 This document will use the default TTL.

Here is an ESI include with a five second timeout: 2008-05-09T18:16:12
Here is an ESI include with a twenty second timeout: 2008-05-09T18:16:14