Name : python-repoze.lru
| |
Version : 0.5
| Vendor : obs://build_opensuse_org/isv:B1-Systems
|
Release : 1.1
| Date : 2012-06-29 20:57:09
|
Group : Development/Languages/Python
| Source RPM : python-repoze.lru-0.5-1.1.src.rpm
|
Size : 0.05 MB
| |
Packager : (none)
| |
Summary : A tiny LRU cache implementation and decorator
|
Description :
repoze.lru ==========
``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.
API ---
Creating an LRUCache object::
from repoze.lru import LRUCache cache = LRUCache(100) # 100 max length
Retrieving from an LRUCache object::
cache.get(\'nonexisting\', \'foo\') # will return \'foo\' cache.get(\'nonexisting\') # will return None cache.get(\'existing\') # will return the value for existing
Adding to an LRUCache object::
cache.put(\'key\', \'value\') # will add the key \'key\' with the value \'value\'
Clearing an LRUCache::
cache.clear()
Decorator ---------
A ``lru_cache`` decorator exists. All values passed to the decorated function must be hashable. It does not support keyword arguments::
from repoze.lru import lru_cache
AATTlru_cache(500) def expensive_function(*arg): pass
Each function decorated with the lru_cache decorator uses its own cache related to that function.
Changelog =========
After 0.5 ---------
- Bug: Remove potential race condition on lock in face of interrupts (Issue #10).
0.5 (2012-03-24) ----------------
- 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).
0.4 (2011-09-04) ----------------
- 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.
0.3 (2009/06/16) ----------------
- Add a thread lock around ``clear`` logic.
0.2 (2009/06/15) ----------------
- Add a ``clear`` method.
0.1 (2009/06/14) ----------------
- Initial release.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/isv:/B1-Systems:/OpenStack:/release:/Essex:/requirements/SLE_11_SP2/x86_64 |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
python-repoze.lru
Requires :