cachex icon indicating copy to clipboard operation
cachex copied to clipboard

Add a very basic LRU cache clear implementation

Open whitfin opened this issue 2 years ago • 3 comments

There's a really "easy" way to implement very basic LRU using LRW, by adding a hook to the LRW implementation to update touch time when a key is accessed and then using LRW as usual. We should add this basic implementation to the repository (and obviously document the changing touch time).

whitfin avatar Jan 09 '23 06:01 whitfin

I still don't like including this, because people will see LRU available and gravitate to it naturally. I think maybe putting some docs together, rather than including it, would be a better way to solve this.

whitfin avatar Jan 09 '23 19:01 whitfin

I still don't like including this, because people will see LRU available and gravitate to it naturally. I think maybe putting some docs together, rather than including it, would be a better way to solve this.

Hello, @whitfin do you have a recommendation to do a basic LRU policy?

juancgalvis avatar Sep 16 '23 19:09 juancgalvis

@juancgalvis I am once again going to consider this for v3.7.0 coming soon - no promises, but I'll definitely at least document an example.

whitfin avatar Jan 04 '24 13:01 whitfin