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

Support timeout for SaveToFile/SaveToFileConcurrent #38

Open
ehnuje opened this issue Sep 15, 2020 · 2 comments
Open

Support timeout for SaveToFile/SaveToFileConcurrent #38

ehnuje opened this issue Sep 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@ehnuje
Copy link

ehnuje commented Sep 15, 2020

In our project, fastcache consumes 40~50GB and it takes about 7 minutes to save the cache to the disk, which is too long.
As we can get benefit from saving only partial part of the cache to the disk, it would be nice if SaveToFile/SaveToFileConcurrent accepts Context to support timeout. How do you think?

@valyala
Copy link
Collaborator

valyala commented Sep 21, 2020

I think it is better limiting the size of the cache, so it could be saved to disk in reasonable time. I see little sense in partially saved cache.

@ehnuje
Copy link
Author

ehnuje commented Sep 22, 2020

I think it is better limiting the size of the cache, so it could be saved to disk in reasonable time. I see little sense in partially saved cache.

@valyala We're currently saving the nodes of a tree to fastcache. As the nodes close to the root are frequently accessed, partially saved cache can be helpful. I think there might be similar cases like ours. How do you think?

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

2 participants