Python:缓存库mo-cache支持内存、文件、Redis

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()
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页