python-redis-cache:用于Python函数的简单Redis缓存

时间:2021-05-15 23:45:21
【文件属性】:
文件名称:python-redis-cache:用于Python函数的简单Redis缓存
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-15 23:45:21
Python python-redis-cache 用于Python函数的简单Redis缓存 要求 Redis 5+ Python 3.6+ 如何安装 pip install python-redis-cache 如何使用 from redis import StrictRedis from redis_cache import RedisCache client = StrictRedis ( host = "redis" , decode_responses = True ) cache = RedisCache ( redis_client = client ) @ cache . cache () def my_func ( arg1 , arg2 ): result = some_expensive_operation () return result # Use th
【文件预览】:
python-redis-cache-master
----setup.py(753B)
----.gitignore(1KB)
----conftest.py(0B)
----test.sh(29B)
----LICENSE(1KB)
----setup.cfg(53B)
----docker-compose.yml(311B)
----.github()
--------workflows()
----README.md(3KB)
----tests()
--------test_redis_cache.py(6KB)
----redis_cache()
--------__init__.py(5KB)

网友评论