• AlveElde's avatar
    expire: Introduce EXP_Reduce() · 9c0abf0c
    AlveElde authored
    This commit introduces EXP_Reduce(), a function to reduce object timers.
    The goal is to provide a function better suited to soft-purging objects,
    as EXP_Rearm() has some non-obvious disadvantages when used or this
    purpose.
    
    When EXP_Rearm() is used to soft-purge an object by setting its TTL to
    0, the expiry is effectively reset to the start of the objects grace
    period. This happens because the object TTL includes a time delta
    between object insertion time (oc->t_origin) and now. The result is that
    a soft-purge extends the lifetime of an already stale object, and
    repeated soft-purges can keep the object away from expiry indefinitely.
    
    The EXP_Reduce() function is better suited for soft-purging, as it only
    updates an objects TTL if it would reduce the objects lifetime. The
    function also has facilities for reducing grace and keep.
    9c0abf0c
Name
Last commit
Last update
.circleci Loading commit data...
.github Loading commit data...
bin Loading commit data...
contrib Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
vmod Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.lgtm.yml Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...
vsc.am Loading commit data...
vtc.am Loading commit data...
wflags.py Loading commit data...