Skip to content

Repository files navigation

yamicache

Pypi VersionDocumentation StatusCoveralls Status

Yet another in-memory caching package

Features

  • Memoization
  • Selective caching based on decorators
  • Mutli-threaded support
  • Optional garbage collection thread
  • Optional time-based cache expiration

Quick Start

from __future__ importprint_functionimporttimefromyamicacheimportCachec=Cache()
classMyApp(object):
@c.cached()deflong_op(self):
time.sleep(30)
return1app=MyApp()
t_start=time.time()
assertapp.long_op() ==1# takes 30sassertapp.long_op() ==1# takes 0sassertapp.long_op() ==1# takes 0sassert1< (time.time() -t_start) <31

About

Yet another in-memory caching package

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages