On-disk caching
pip install git+https://github.com/Notmeor/cacheer.git
from cacheer.manager import cache_manager
@cache_manager.cache()
def some_function(*args, **kw):
pass
Check whether we're in caching mode
cache_manager.is_using_cache()
Disable caching
cache_manager.disable()
Enable cacheing when it's previously disabled
cache_manager.enable()
Disable caching with context manager
with cache_manager.cache.no_cache():
some_function()
Run a function while declaring its existing cache outdated (so its cache would be recreated/updated after this call)
with cache_manager.cache.outdate():
some_function()