New on ESI, page example doesn't work

Laurence Rowe l at lrowe.co.uk
Wed Oct 6 17:20:39 CEST 2010


On 6 October 2010 00:24, Claudio Castro <ccastro at altavoz.net> wrote:
> vcl:
> 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?

You are running esi when the page is fetched and then caching the result.

Run esi in vcl_deliver to make the include dynamic.

Laurence




More information about the varnish-misc mailing list