New on ESI, page example doesn't work

Claudio Castro ccastro at
Wed Oct 6 01:24:10 CEST 2010


I'm having excellent results using a basic varnish config on a large 
traffic site (200-250 Mbps), now i want to step up using ESI on my 
dynamic pages, but i try the ESI example on varnish wiki, with no luck.


The time is: <esi:include src="/cgi-bin/date.cgi"/>
at this very moment.


echo 'Content-type: text/html'
echo ''
date "+%Y-%m-%d %H:%M"

sub vcl_fetch {

    if (req.url == "/test.html") {
        esi;  /* Do ESI processing */
        set obj.ttl = 24 h;
    } elseif (req.url == "/cgi-bin/date.cgi") {
        set obj.ttl = 1m;

I get date.cgi correctly, but esi include seems to be executed just once 
(no change on date info), any hint?

Thanks in advance,

FreeBSD 8.0-RELEASE amd64
varnishd (varnish-2.1.3 SVN )

Claudio Castro N.
Ingeniero Jefe Area de Plataforma
AltaVoz S.A.
Viña del Mar:
  2 Poniente 355 of 53
  +56 32 276 8060
  Pedro de Valdivia 555 of 315
  +56 2 585 4264

More information about the varnish-misc mailing list