Handle ESI-includes on cached page

Roman Arkharov arkharov at gmail.com
Thu Jul 11 19:35:49 CEST 2013


Hi Everyone.

I have a question about ESI includes in Varnish 3. I have 2 types of cache
which stored in Varnish:
1) page cache,
2) blocks cache.

Every page contains several blocks. Pages are generated by script index.php
and have TTL 15 minutes (set by HTTP header max-age). Blocks are generated
by script blocks.php and have TTL from 1 to 5 minutes. Blocks are included
to page by ESI instructions like:

<esi:include src="/blocks.php?block=some-name" />

I've read manual on varnish-cache.org (
https://www.varnish-cache.org/docs/3.0/tutorial/esi.html) and different
tutorials, but I've not found: is it possible to handle ESI instructions on
every request to cached page? In cause of page has TTL more than blocks,
blocks are updated only when page cache flushed.

As far as I understand from this presentation:
http://www.slideshare.net/neorey/varnish-the-high-performance-valhalla-9321198(slides
33-34) ESI-includes can be handle only if request served from
backend, because only in this case vcl_fetch called, am I right?

Thank you.
Roman Arkharov
arkharov at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130711/9383a6a3/attachment.html>


More information about the varnish-misc mailing list