Purge
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Jul 21 23:35:09 CEST 2006
In message <1213.193.69.165.4.1153468736.squirrel at denise.vg.no>, "Anders Berg"
writes:
>> sub vcl_fetch {
>> if (req.url = "/") {
>> obj.ttl = 120;
>> }
>> }
Provided the correct syntax is used, and the default rules called
afterwards, this now works.
The syntax error in the above example is that the obj.ttl variable
is a time variable, so the 120 needs a time unit as well.
>> sub vcl_fetch {
>> if (req.url = "/") {
>> obj.ttl = 120s;
>> }
>> call default_vcl_fetch;
>> }
or
>> sub vcl_fetch {
>> if (req.url = "/") {
>> obj.ttl = 2m;
>> }
>> call default_vcl_fetch;
>> }
Will both work now.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list