Skip to main content

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

Latest PyPI version Number of PyPI downloads

License

cachetools is Copyright 2014 Thomas Kemmer.

Licensed under the MIT License.

Project details


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page