SIGN IN SIGN UP

graph, node, store: Add max_contracts parameter to clear_stale_call_cache

When --max-contracts is passed alongside --ttl-days, compute an effective
TTL that limits eviction to at most that many contracts. The effective TTL
is determined by looking at the (max_contracts+1)th oldest stale entry in
call_meta; if it exists, the cutoff is set to its accessed_at date so that
contracts at that date are excluded. When multiple contracts share the
boundary date, fewer than max_contracts may be deleted since the cutoff
operates at date granularity.
D
David Lutterkort committed
5043bc903c006b7134bdadb5a08de8496dad94ef
Parent: d42d1c7