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

Comments

2 participants
@hwchen

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 msiemens closed this in 7af4bf5 Jan 3, 2016

@msiemens

This comment has been minimized.

Show comment
Hide comment
@msiemens

msiemens Jan 3, 2016

Owner

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!

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

This comment has been minimized.

Show comment
Hide comment
@hwchen

hwchen 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).

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