mailgun / expiringdict

Dictionary with auto-expiring values for caching purposes.
Apache License 2.0
344 stars 76 forks source link

Fix bug when setting existing key in full dict (minimal version of PR #32) #43

Closed nicktimko closed 4 years ago

nicktimko commented 4 years ago

Minimal version of PR #32 without adding a counter.

Line 133 in the test file would trigger the logic to unconditionally drop the oldest element at key 'a' without checking if we're going to overwrite an additional element and not actually extend the size of the dictionary.

horkhe commented 4 years ago

Thank you for your contribution.