Python 2.7 memoizing collections and decorators
Project description
This module provides various memoizing collections and function decorators, including a variant of the Python 3 Standard Library lru_cache decorator.
Important Note: This module is in early pre-alpha, and not fit for any purpose (yet).
>>> from cachetools import LRUCache
>>> cache = LRUCache(maxsize=16)
>>> cache['test'] = 1
>>> cache.info()
CacheInfo(hits=0, misses=0, maxsize=16, currsize=1)
>>> cache['test']
1
>>> cache.info()
CacheInfo(hits=1, misses=0, maxsize=16, currsize=1)
Installation
Install cachetools using pip:
pip install cachetools
Project Resources
License
cachetools is Copyright 2014 Thomas Kemmer.
Licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cachetools-0.0.0.tar.gz
(4.0 kB
view hashes)