SamSaffron / lru_redux

An efficient optionally thread safe LRU Cache
MIT License
285 stars 20 forks source link

I wish that getset could ignore nil #21

Open kwerle opened 1 year ago

kwerle commented 1 year ago
cache.getset(:foo, ignore_nil: true) { nil }
cache.key?(:foo) == false
cache[:foo] == nil
cache.getset(:foo, ignore_nil: true) { :bar }
cache.key?(:foo) == true
cache[:foo] == :bar
tamcv commented 1 year ago

Hey, is this repository still alive? I would like to contribute a PR for this request