• Nils Goroll's avatar
    Add bans on obj.ttl, obj.age, obj.grace and obj.keep · b06cdbba
    Nils Goroll authored
    Also add a duration argument type and the operators >, >=, < and <=
    for use with it (besides the existing == and !=).
    
    obj.ttl and obj.age are compared relative to the time the ban was
    issued, as required by the fact that bans are evaluated some arbitrary
    time after they are created. For this reason, the ban_dups parameter
    has no effect on obj.ttl and obj.age bans, duplicates of bans using
    these fields are never removed.
    
    obj.grace and obj.keep are compared as absolute values.
    
    In an effort to support The Proprietary Stevedore (tm) [or any other storage
    engine supporting persistent bans - if any?], the existing ban serialisation
    format is preserved and upgrades _should_ work seamlessly. But downgrades won't.
    
    Using the BANS_HAS_* macros, we try to make the relationship between the ban
    serialisation in cache_ban_build.c and access in cache_ban.c more obvious.
    
    We now generate all fields and operators from table files as well as
    the definition of allowed operators for fields. The user help text
    about allowed operators is generated at init time.
    b06cdbba
cache_ban.h 5.35 KB