Memory and disk cache for functions
Project description
Not again!
Memoize any function with this lightweight decorator, even across runs. It stores results in memory and disk.
Get it.
pip install notagain
Use it.
from notagain import memoize
@memoize()
def expensive_function(arg, kwarg=None):
# i.e. some boring query
return arg
Control it.
@memoize(cache_dir='tmp', memory_cache=True, disk_cache=True)
You can change the pickles path. You can deactivate memory and/or disk cache.
About the name
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
notagain-0.2.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for notagain-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaf02ce456bd444d8cce7de56cd56128632ab54ef4debaaf394963f33f85f378 |
|
MD5 | b55bf1fa83b7f49bc2d1817ca1720ed7 |
|
BLAKE2b-256 | 15e28f4e7ffb2cb76c04db57e0f23d9e3e783e40a00582fc2236e37f91ef8f9d |