Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
e0b02b84
Commit
e0b02b84
authored
Oct 04, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill req.grace (grace is now a VCL decision, so it's unneeded).
Kill req.keep (it never made any sense in the first place).
parent
1aa28e5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
29 deletions
+8
-29
cache_expire.c
bin/varnishd/cache/cache_expire.c
+0
-4
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+0
-2
b00030.vtc
bin/varnishtest/tests/b00030.vtc
+2
-2
v00000.vtc
bin/varnishtest/tests/v00000.vtc
+2
-7
v00020.vtc
bin/varnishtest/tests/v00020.vtc
+4
-4
generate.py
lib/libvcc/generate.py
+0
-10
No files found.
bin/varnishd/cache/cache_expire.c
View file @
e0b02b84
...
...
@@ -115,8 +115,6 @@ EXP_Keep(const struct req *req, const struct object *o)
r
=
(
double
)
cache_param
->
default_keep
;
if
(
o
->
exp
.
keep
>
0
.)
r
=
o
->
exp
.
keep
;
if
(
req
!=
NULL
&&
req
->
exp
.
keep
>
0
.
&&
req
->
exp
.
keep
<
r
)
r
=
req
->
exp
.
keep
;
return
(
EXP_Ttl
(
req
,
o
)
+
r
);
}
...
...
@@ -128,8 +126,6 @@ EXP_Grace(const struct req *req, const struct object *o)
r
=
(
double
)
cache_param
->
default_grace
;
if
(
o
->
exp
.
grace
>=
0
.)
r
=
o
->
exp
.
grace
;
if
(
req
!=
NULL
&&
req
->
exp
.
grace
>
0
.
&&
req
->
exp
.
grace
<
r
)
r
=
req
->
exp
.
grace
;
return
(
EXP_Ttl
(
req
,
o
)
+
r
);
}
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
e0b02b84
...
...
@@ -473,8 +473,6 @@ vrt_wsp_exp(struct vsl_log *vsl, double now, const struct exp *e)
}
VRT_DO_EXP
(
req
,
ctx
->
req
->
exp
,
ttl
,
0
,
)
VRT_DO_EXP
(
req
,
ctx
->
req
->
exp
,
grace
,
0
,
)
VRT_DO_EXP
(
req
,
ctx
->
req
->
exp
,
keep
,
0
,
)
VRT_DO_EXP
(
obj
,
ctx
->
req
->
obj
->
exp
,
grace
,
0
,
EXP_Rearm
(
ctx
->
req
->
obj
);
...
...
bin/varnishtest/tests/b00030.vtc
View file @
e0b02b84
...
...
@@ -10,7 +10,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_recv {
return (error(200,req.
grace
));
return (error(200,req.
ttl
));
}
sub vcl_error {
set obj.http.x-timestamp = now;
...
...
@@ -20,5 +20,5 @@ varnish v1 -vcl+backend {
client c1 {
txreq
rxresp
expect resp.msg == "
0
.000"
expect resp.msg == "
-1
.000"
} -run
bin/varnishtest/tests/v00000.vtc
View file @
e0b02b84
...
...
@@ -10,7 +10,7 @@ server s1 -start
varnish v1 -vcl+backend {
sub vcl_recv {
set req.
grace
+= 1 s;
set req.
ttl
+= 1 s;
}
sub vcl_backend_response {
set beresp.ttl += 1 m;
...
...
@@ -22,10 +22,5 @@ client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
}
client c1 -run
server s1 -wait
} -run
varnish v1 -stop
bin/varnishtest/tests/v00020.vtc
View file @
e0b02b84
...
...
@@ -52,7 +52,7 @@ varnish v1 -errvcl {Symbol not found: 'vcl_recv' (expected type STRING_LIST)} {
# XXX: not obvious if this actually fails for the desired reason ?
varnish v1 -errvcl {Unknown token '-' when looking for DURATION} {
sub vcl_recv {
if (req.
grace < -3s || req.grace
) {
if (req.
ttl < -3s || req.ttl
) {
set req.http.foo = vcl_recv;
}
}
...
...
@@ -60,7 +60,7 @@ varnish v1 -errvcl {Unknown token '-' when looking for DURATION} {
varnish v1 -errvcl {'&&' must be followed by BOOL, found DURATION.} {
sub vcl_recv {
if (req.
grace < 3s && req.grace
) {
if (req.
ttl < 3s && req.ttl
) {
set req.http.foo = vcl_recv;
}
}
...
...
@@ -74,13 +74,13 @@ varnish v1 -errvcl {Operator * not possible on type STRING.} {
varnish v1 -errvcl {DURATION + INT not possible.} {
sub vcl_backend_response {
set req.http.foo = req.
grace
+ beresp.status;
set req.http.foo = req.
ttl
+ beresp.status;
}
}
varnish v1 -errvcl {'!' must be followed by BOOL, found DURATION.} {
sub vcl_backend_response {
if (! req.
grace
) {
if (! req.
ttl
) {
}
}
}
...
...
lib/libvcc/generate.py
View file @
e0b02b84
...
...
@@ -172,16 +172,6 @@ sp_variables = [
(
'client'
,),
(
'client'
,),
),
(
'req.grace'
,
'DURATION'
,
(
'client'
,),
(
'client'
,),
),
(
'req.keep'
,
'DURATION'
,
(
'client'
,),
(
'client'
,),
),
(
'req.xid'
,
'STRING'
,
(
'client'
,),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment