• Pål Hermunn Johansen's avatar
    Introduce ttl_now and the new way of calculating TTLs in VCL · 33143e05
    Pål Hermunn Johansen authored
    A new fucntion, ttl_now(VRT_CTX), defines what "now" is when ttl
    and age are calculated in various VCL subs. To sum up,
    
    * Before a backend fetch on the client side (vcl_recv, vcl_hit,
      vcl_miss) we use t_req from the request. This is the significance
      in this commit, and fixes the bug demonstrated by r02555.vtc.
    * On the backend side, most notably vcl_backend_responce, we keep
      the old "now" by simply using ctx->now.
    * In vcl_deliver we use ctx->now, as before.
    
    It was necessary to make all purges use t_req as their base time.
    Then, to not break c00041.vtc it was necessary to change from ">="
    to ">" in HSH_Lookup.
    
    All VMODs that currently use HSH_purge must change to using
    VRT_purge.
    33143e05
Name
Last commit
Last update
..
cache Loading commit data...
common Loading commit data...
hash Loading commit data...
hpack Loading commit data...
http1 Loading commit data...
http2 Loading commit data...
mgt Loading commit data...
proxy Loading commit data...
storage Loading commit data...
waiter Loading commit data...
Makefile.am Loading commit data...
Makefile.phk Loading commit data...
VSC_lck.vsc Loading commit data...
VSC_main.vsc Loading commit data...
VSC_mempool.vsc Loading commit data...
VSC_mgt.vsc Loading commit data...
VSC_sma.vsc Loading commit data...
VSC_smf.vsc Loading commit data...
VSC_smu.vsc Loading commit data...
VSC_vbe.vsc Loading commit data...
builtin.vcl Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
vclflint.lnt Loading commit data...
vclflint.sh Loading commit data...