Due to race conditions between concurrent requests this is still not a
complete fix. But reduces the unwanted re-use of helper responses from
all connections arriving in a whole second which match the ACL key down
to just those that arrive within the reply lag time of the helper.
The grace option has a resolution of 1 second.
ttl = entry->result == 1 ? def->ttl : def->negative_ttl;
ttl = (ttl * (100 - def->grace)) / 100;
- if (entry->date + ttl < squid_curtime)
+ if (entry->date + ttl <= squid_curtime)
return 1;
else
return 0;