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

Lru cache refresh question #87

Closed
hwchen opened this issue Dec 31, 2015 · 2 comments
Closed

Lru cache refresh question #87

hwchen opened this issue Dec 31, 2015 · 2 comments

Comments

@hwchen
Copy link

hwchen commented Dec 31, 2015

Hello, I have a question about the Lru Cache:

https://github.com/msiemens/tinydb/blob/master/tinydb/utils.py#L36

Should the refresh() method only append a value only if it already existed and was removed? For example, in when refresh() is called in get(), I think it's possible that a wrong key will still result in that key being added to the lru.

@msiemens
Copy link
Owner

msiemens commented Jan 3, 2016

Yep, that's a bug! The tests actually didn't cover that case. I've now added and pushed the corresponding tests. Thanks for reporting!

@hwchen
Copy link
Author

hwchen commented Jan 4, 2016

Glad I could help!

On Sun, Jan 3, 2016 at 6:17 PM, Markus Siemens notifications@github.com
wrote:

Yep, that's a bug! The tests actually didn't cover that case. I've now
added and pushed the corresponding tests. Thanks for reporting!


Reply to this email directly or view it on GitHub
#87 (comment).

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