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

Expire entries and run compactions explicitly in the background #3

Open
udoprog opened this issue Jul 19, 2019 · 0 comments
Open

Expire entries and run compactions explicitly in the background #3

udoprog opened this issue Jul 19, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@udoprog
Copy link
Owner

udoprog commented Jul 19, 2019

Compactions are currently handled by rocksdb which spawns its own threads for this purpose.

Instead, allow the user to setup their own background process (the following is just an example):

let cleaner = cache.cleaner().entry_limit(100).interval(Duration::secs(10)).build();
tokio::spawn(cleaner);

This way, if the cleaner is dropped, so is the background procedure.

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

No branches or pull requests

1 participant