jmettraux/rufus-lru — pull request #2 by bayclosed (2014-02-27 10:39:43+00:00)
Title: couple of features to rufus-lru

Hello John,

I've chosen your LRU implementation because of its clarity,
and decided to add two independent features:

1. sometimes it's better to remove expired LRU entries manually (say, at the end of transaction); so does #squeeze!

2. if a value of a hash entry has destructor #clear it will be called when this entry is being removed from the hash (by any reason - #delete, #clear, #squeeze!, auto-LRU)

Both features are off by default (so initial default behavior hasn't changed) and can be manipulated either upon hash creation or during its lifetime.

Please feel free to merge these changes into your repo and publish via rubygems.

best,
Gleb Kuzmenko