Purge
Anders Berg
andersb at vgnett.no
Sat Jul 22 12:05:14 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.
Great. Will you put in a
obj.ttl = 120s on "/" before next test?
Also I have put weight=1 on the loadbalancer, so you are ready to go at will.
Anders Berg
>
> --
> 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