Using ESI-tags inside a cached object

Hugo Cisneiros (Eitch) hugo.cisneiros at
Tue Jul 10 19:34:16 CEST 2012

On Mon, Jul 9, 2012 at 11:51 AM, Kasper Grubbe <kaspergrubbe at> wrote:
> I am following the guide here:
> I have two pages in my project as of now:
> 1. (Cache-Control:max-age=60, private):
> <b>Cached:</b> <%= %> <br/>
> <b>ESI:</b> <esi:include src="/staticview" /> <br/>
> 2. (Cache-Control:max-age=1, private):
> <%= %>
> However, every time I request the first page, it seems like it also
> caches the ESI-include result for the 60 seconds instead of refreshing
> every second.

I think it is expected, as you're caching the ESI page too. When
varnish finds an ESI tag, it gets the page as a internal new request.
So you must do a pass on the /staticview, and it will be always


More information about the varnish-misc mailing list