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

Changed items aren't moved to the end of the list, will be expired in the wrong order #34

Open
MattEttus opened this issue Dec 10, 2018 · 1 comment

Comments

@MattEttus
Copy link

The order in an OrderedDict is based on the order of original insertion. If you modify an item, even though the expiry is changed, it stays in the same position as it originally was. This can cause the wrong items to be dropped.

The solution would be to first delete the item before setting it in set item.

@MattEttus
Copy link
Author

To clarify, this can result in newer unexpired items being pushed out while older expired items remain.

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

1 participant