A tiny LRU cache implementation and decorator
repoze.lru is a LRU (least recently used) cache implementation. Keys and values that are not used frequently will be evicted from the cache faster than keys and values that are used frequently. It works under Python 2.5, Python 2.6, Python 2.7, and Python 3.2.
Please see docs/index.rst for detailed documentation.
- Added a ‘CacheMaker’ helper class: a maker keeps references (by name) to the caches it creates, to permit them to be cleared.
- Added statistics to each cache, tracking lookups, hits, misses, and evictions.
- Automated building Sphinx docs and testing example snippets under tox.
- Added Sphinx documentation.
- Dropped support for Python 2.5.
- Added support for PyPy.
- Added setup.py docs alias (installs Sphinx and dependencies).
- Added setup.py dev alias (runs develop plus installs nose and coverage).
- Added support for CI under supported Pythons using tox.
- Bug: Remove potential race condition on lock in face of interrupts (Issue #10).
- Feature: added a new “invalidate()” method to allow removal of items from the cache (issue #8).
- Bug: LRUCache.put() could take multiple seconds on large caches (Issue #7).
- Bug: LRUCache was not thread safe (Issue #6).
- Bug: LRUCache.clock would waste RAM (Issue #4).
- Bug: repeated pushing of an entry would remove other cache entries (Issue #3).
- Bug: LRUCache would evict entries even when not full (Issue #2).
- Moved to GitHub (https://github.com/repoze/repoze.lru).
- Added Python 3.2 support.
- Python 2.4 no longer supported.
- Added tox.ini for easier testing.
- Add a thread lock around clear logic.
- Add a clear method.
- Initial release.