Skip to content

Notmeor/cacheer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

cacheer

On-disk caching

Installation

pip install git+https://github.com/Notmeor/cacheer.git

Usage

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()

About

On-disk caching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages