haskell-cache
haskell-cache copied to clipboard
Simplify prugeExpired
It looks like purgeExpired's implementation is just a more complicated was of running HashMap.filter (not . isExpired now), which would likely be much more efficient than repeatedly reading and writing the TVar for each key.
You are correct! I currently don't have time to make any changes, but I'd welcome a PR. otherwise, it might take a while.
I'll see what I can do tonight.