what is the ttl?

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Aug 28 13:57:42 CEST 2014


--------
In message <53FF168B.5020405 at uplex.de>, Geoff Simmons writes:

>Then how about this?
>
>        sub vcl_backend_response {
>		# TTL adds another two minutes, regardless of
>		# current Age.
>                set beresp.ttl = 120s + beresp.age;
>	}

To what your comment says, you would:

                set beresp.ttl = 120s;

because in VCL ttl is always relative to now.

I think the task is how do we express "Give this a total lifetime
of two minutes" and that would be:

		set beresl.ttl = 120s - beresp.age;

>This would mean exposing (beresp|obj).age -- we seem to have a
>consensus on that.

Yes, unless this discussion leads to better results.

-- 
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