[Varnish] #1032: Varnish 3 ESI tutorial incorrectly refers to obj.ttl
Varnish
varnish-bugs at varnish-cache.org
Thu Oct 13 06:31:09 CEST 2011
#1032: Varnish 3 ESI tutorial incorrectly refers to obj.ttl
-----------------------+----------------------------------------------------
Reporter: chrismsnz | Type: documentation
Status: new | Priority: low
Milestone: | Component: documentation
Version: 3.0.0 | Severity: normal
Keywords: |
-----------------------+----------------------------------------------------
The error in question is on this page:
https://www.varnish-cache.org/docs/3.0/tutorial/esi.html#example-esi-
include
Trying to compile the code fragment:
{{{
sub vcl_fetch {
if (req.url == "/test.html") {
set beresp.do_esi = true; /* Do ESI processing */
set obj.ttl = 24 h; /* Sets the TTL on the HTML above */
} elseif (req.url == "/cgi-bin/date.cgi") {
set obj.ttl = 1m; /* Sets a one minute TTL on */
/* the included object */
}
}
}}}
Causes varnish to throw an error:
{{{
Message from VCC-compiler:
'obj.ttl': cannot be set in method 'vcl_fetch'.
}}}
The correct way to set the TTL in Varnish 3 is to use {{{ beresp.ttl }}}
and the documentation should be updated to reflect that.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1032>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list