Instead of storing cached entries in a Dict
mapping arguments to true
or false
, we can just store two sets - one for inputs where the result is true
and the other for false
. A function that is biased toward true
would clear the false
cache less often, improving cache hit rate.