Commit 83a93b0b authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Accept a negative TTL with purge.soft

parent ffdeafe3
......@@ -93,8 +93,8 @@ $Function INT soft(DURATION ttl = 0, DURATION grace = -1, DURATION keep = -1)
Description
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
the parameters leaves them untouched. Setting all three parameters to
and keep periods left untouched. Setting a negative value for grace or
keep periods leaves them untouched. Setting all three parameters to
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.
......
......@@ -49,8 +49,6 @@ vmod_soft(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ttl < 0)
ttl = NAN;
if (grace < 0)
grace = NAN;
if (keep < 0)
......
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