Skip to content

weaming/sized-cacher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sized Cacher

Cache results of function call with expire and maxsize.

pip3 install -U sized-cacher

Usage

disk_cache = DiskCache("./caches", maxsize=3)

@disk_cache.caching
def fn(a):
    return a

for i in range(10):
    print(fn(i))

API

  • self.save(value, *args, **kwargs)
  • new_func = self.caching(func)

About

Cache results of function call with expire and maxsize.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages