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
83a93b0b
Commit
83a93b0b
authored
Sep 05, 2017
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept a negative TTL with purge.soft
parent
ffdeafe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
vmod.vcc
lib/libvmod_purge/vmod.vcc
+2
-2
vmod_purge.c
lib/libvmod_purge/vmod_purge.c
+0
-2
No files found.
lib/libvmod_purge/vmod.vcc
View file @
83a93b0b
...
@@ -93,8 +93,8 @@ $Function INT soft(DURATION ttl = 0, DURATION grace = -1, DURATION keep = -1)
...
@@ -93,8 +93,8 @@ $Function INT soft(DURATION ttl = 0, DURATION grace = -1, DURATION keep = -1)
Description
Description
Sets the TTL, grace and keep. By default, TTL is set to 0 with grace
Sets the TTL, grace and keep. By default, TTL is set to 0 with grace
and keep periods left untouched. Setting a negative value for
any of
and keep periods left untouched. Setting a negative value for
grace or
the parameter
s leaves them untouched. Setting all three parameters to
keep period
s leaves them untouched. Setting all three parameters to
0 is equivalent to a hard purge. It can only be called from ``vcl_hit``
0 is equivalent to a hard purge. It can only be called from ``vcl_hit``
or ``vcl_miss``. It returns the number of soft-purged objects.
or ``vcl_miss``. It returns the number of soft-purged objects.
...
...
lib/libvmod_purge/vmod_purge.c
View file @
83a93b0b
...
@@ -49,8 +49,6 @@ vmod_soft(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
...
@@ -49,8 +49,6 @@ vmod_soft(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
{
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
if
(
ttl
<
0
)
ttl
=
NAN
;
if
(
grace
<
0
)
if
(
grace
<
0
)
grace
=
NAN
;
grace
=
NAN
;
if
(
keep
<
0
)
if
(
keep
<
0
)
...
...
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