Instead of that complicated minute&#x2F;day&#x2F;week&#x2F;year data retention scheme, why not just randomly replace an entry in a fixed-size store?  So the probability of a datum being in the store is inversely proportional to the log of its age.
And it&#x27;s a one-liner.