Commit c7e56c42 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Random polishing

parent 16b38907
......@@ -22,18 +22,6 @@ varnish v1 -errvcl {Found: '0' at} { 0; }
varnish v1 -errvcl {Expected an action, 'if', } " sub vcl_recv { { } { "
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_backend_response {
set beresp.ttl = 1w;
set beresp.ttl *= 1.5;
set beresp.ttl = 1.5 s * 2.5;
set beresp.ttl = 1.5 s / 2.5;
set beresp.ttl = 1.5h + 1.5s;
set beresp.ttl = 1.5h - 1.5s;
}
}
varnish v1 -errvcl {Comparison of different types: INT '!=' STRING} {
sub vcl_recv {
if (!req.restarts != req.url) {
......@@ -109,10 +97,17 @@ varnish v1 -vcl {
set req.http.foo = req.http.foo + "bar" !~ "bar";
set req.ttl = 1s;
set req.ttl *= 1.5;
set req.ttl = 1.5 s * 2.5;
set req.ttl = 1.5 s / 2.5;
set req.ttl = 1.5h + 1.5s;
set req.ttl = 1.5h - 1.5s;
if (req.ttl) { }
if (!req.ttl) { }
if (!req.url) { }
if (1) { }
}
}
......@@ -231,14 +226,6 @@ varnish v1 -errvcl {DURATION + STRING not possible.} {
}
}
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_miss {
if (!req.url) {
}
}
}
varnish v1 -errvcl {Name of function, 'foo-bar', contains illegal character '-'} {
backend b { .host = "127.0.0.1"; }
sub foo-bar {
......
......@@ -100,8 +100,8 @@ Time
~~~~
VCL has time. A duration can be added to a time to make another time.
In string context they return a formatted string in RFC1123 format
(e.g. Sun, 06 Nov 1994 08:49:37 GMT).
In string context they return a formatted string in RFC1123 format,
e.g. Sun, 06 Nov 1994 08:49:37 GMT.
The keyword *now* returns a time representing the current time in seconds
since the Epoch.
......@@ -109,8 +109,8 @@ since the Epoch.
Durations
~~~~~~~~~
Durations are defined by a number and a designation. The number can be a real
so 1.5w is allowed.
Durations are defined by a number followed by an unit. The number can
include a fractional part, e.g. 1.5s. The supported units are:
ms
milliseconds
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment