• 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
..
varnishadm Loading commit data...
varnishd Loading commit data...
varnishhist Loading commit data...
varnishlog Loading commit data...
varnishncsa Loading commit data...
varnishstat Loading commit data...
varnishtest Loading commit data...
varnishtop Loading commit data...
Makefile.am Loading commit data...
flint.lnt Loading commit data...