Mo-Cache

Github: https://github.com/mouday/Mo-Cache

a simple cache lib support memory、file、redis

install

pip install mo-cache

demo

from mo_cache import cache_decorator

cache = cache_decorator('memory')

@cache
def foo(a, b):
    return a + b

if __name__ == '__main__':
    foo()