Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a very basic LRU cache clear implementation #305

Open
whitfin opened this issue Jan 9, 2023 · 3 comments
Open

Add a very basic LRU cache clear implementation #305

whitfin opened this issue Jan 9, 2023 · 3 comments
Assignees
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Jan 9, 2023

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 whitfin added this to the v3.5.0 milestone Jan 9, 2023
@whitfin whitfin self-assigned this Jan 9, 2023
@whitfin
Copy link
Owner Author

whitfin commented Jan 9, 2023

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 whitfin removed this from the v3.5.0 milestone Jan 9, 2023
@juancgalvis
Copy link

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?

@whitfin
Copy link
Owner Author

whitfin commented Jan 4, 2024

@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 whitfin added this to the v3.7.0 milestone Jan 4, 2024
@whitfin whitfin modified the milestones: v3.7.0, v4.0.0 Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants