Issue 10593: LRU Cache with maxsize=None (original) (raw)
Issue10593
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/54802
classification
Title: | LRU Cache with maxsize=None | ||
---|---|---|---|
Type: | enhancement | Stage: | |
Components: | Library (Lib) | Versions: | Python 3.2 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | ncoghlan | Nosy List: | ncoghlan, rhettinger |
Priority: | low | Keywords: | patch |
Created on 2010-12-01 01:01 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
cache2.diff | rhettinger,2010-12-01 01:07 | Support maxsize=None |
Messages (3) | ||
---|---|---|
msg122967 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2010-12-01 01:01 |
Nick, I may have found a straight-forward way to incorporate your idea for the cache to support maxsize=None. Let me know what you think. | ||
msg122969 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2010-12-01 01:35 |
Nice! You may still need to use the lock even for the simple unbounded case though - incrementing hits and misses isn't atomic, so the statistics may be miscounted if you get a hit or miss in different threads at the same time. Alternatively, we could just document the hit/miss statistics as approximate figures for tuning purposes rather than guaranteeing 100% accuracy in all situations. | ||
msg122977 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2010-12-01 03:46 |
Applied in r86911. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:09 | admin | set | github: 54802 |
2010-12-01 03:46:15 | rhettinger | set | status: open -> closedresolution: fixedmessages: + |
2010-12-01 01:35:59 | ncoghlan | set | messages: + |
2010-12-01 01:07:51 | rhettinger | set | files: - cache.diff |
2010-12-01 01:07:46 | rhettinger | set | files: + cache2.diff |
2010-12-01 01:01:44 | rhettinger | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements