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

Feature request: evict items when limits are reached. #16

Open
beckend opened this issue Jun 12, 2024 · 1 comment
Open

Feature request: evict items when limits are reached. #16

beckend opened this issue Jun 12, 2024 · 1 comment

Comments

@beckend
Copy link

beckend commented Jun 12, 2024

To not crash the app by eating all memory.
Optional ability to limit by total size or number of keys. Probably LRU eviction, even allow user to provide callback.

@al8n
Copy link
Owner

al8n commented Jun 12, 2024

Optional ability to limit by total size or number of keys

Yeah, this a reasonable feature.

Probably LRU eviction, even allow user to provide callback.

There is a compact method to allow users to remove old version entries. The crate is not a cache but an in-memory MVCC database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants