Bug : Assert error in exp_timer() | Child not responding to ping, killing it.

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Dec 12 11:50:19 CET 2008


Hi Benjamin, I'll look at it.

Just wanted to point this out in the mean time:


>     if (req.url ~ "&ttl=") {
>    if (req.url ~ "&ttl=001") { set obj.ttl=3600s; }
>    if (req.url ~ "&ttl=002") { set obj.ttl=7200s; }
>    if (req.url ~ "&ttl=003") { set obj.ttl=10800s; }
>    if (req.url ~ "&ttl=006") { set obj.ttl=21600s; }
>    if (req.url ~ "&ttl=009") { set obj.ttl=32400s; }
>    if (req.url ~ "&ttl=012") { set obj.ttl=43200s; }
>    if (req.url ~ "&ttl=015") { set obj.ttl=54000s; }
>    if (req.url ~ "&ttl=018") { set obj.ttl=64800s; }
>    if (req.url ~ "&ttl=021") { set obj.ttl=75600s; }
>    if (req.url ~ "&ttl=024") { set obj.ttl=86400s; }
>    if (req.url ~ "&ttl=096") { set obj.ttl=345600s; }
>    if (req.url ~ "&ttl=168") { set obj.ttl=604800s; }
>    if (req.url ~ "&ttl=672") { set obj.ttl=2419200s; }

VCL supports other units of time than seconds, so for
increased readability, you could write:

	set obj.ttl = 1h;
	set obj.ttl = 2h;
	...
	set obj.ttl = 1d;
	...
	set obj.ttl = 1w;
	set obj.ttl = 4w;

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