maidsafe / lru_time_cache

LRU cache settable via size or time to live
BSD 3-Clause "New" or "Revised" License
104 stars 46 forks source link

Add `retain` method #160

Open Rexagon opened 2 years ago

Rexagon commented 2 years ago

In some cases you want to filter all cache entries with some function, so maybe this impl will help do it more optimally

0xdeafbeef commented 2 years ago

@bochaco @dirvine sorry, can you review this?

dirvine commented 2 years ago

We tend to be explicit. If you don't mind can you import the whole Entry type and we are good to go. sorry, but we are pushing consistency. It's a niggle and I apologize. We can get this in today if that's OK.

Rexagon commented 2 years ago

Hi! Is it possible to merge this? Fixed clippy warnings just in case (though they are not related to this commit)