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

Exporting keys #37

Open
rohitjoshi opened this issue Apr 18, 2019 · 3 comments
Open

Exporting keys #37

rohitjoshi opened this issue Apr 18, 2019 · 3 comments

Comments

@rohitjoshi
Copy link
Contributor

It would be good to have the ability to export keys so the cache can be warmup at startup.
I am using iter to get all the keys from LRU but requires an extended period of mutex lock which would impact clients.

Is there any way to export keys with minimal locking duration?

@jeromefroe
Copy link
Owner

Interesting, it sounds like you could use some form of MVCC so that you could get an iterator over the keys at a certain point in time and continue to operate on the cache afterwards?

@rohitjoshi
Copy link
Contributor Author

How do we achieve this?

@jeromefroe
Copy link
Owner

Hi @rohitjoshi! I can't think of a better way currently than to get an iter to iterate over all the keys. To be able to get an iter at a particular snapshot which would allow future operations to continue uninterrupted would be an awesome feature, but would require a significant reworking of the internals of the cache.

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