fastapi-cache icon indicating copy to clipboard operation
fastapi-cache copied to clipboard

我集成了你的库,但报错,是什么原因呢?我的环境是 Python3.8

Open 38602629 opened this issue 2 years ago • 6 comments

async with self.redis.pipeline(transaction=True) as pipe: TypeError: pipeline() got an unexpected keyword argument 'transaction'

38602629 avatar Oct 14 '21 08:10 38602629

aioredis版本是多少,看情况是版本不兼容

long2ice avatar Oct 14 '21 08:10 long2ice

我aioredis 版本是1.3.1 最新版是2.0.0 ,是因为版本问题?

38602629 avatar Oct 25 '21 08:10 38602629

是的,我这个包应该有限制版本

long2ice avatar Oct 25 '21 08:10 long2ice

我修改为最新版的2.0.0了,但很奇怪,我按照你的文档集成进去,却没有任何缓存,还是每次都从数据表里面读数据,而且redis里面也是没有任何KEY出现

38602629 avatar Oct 25 '21 15:10 38602629

只会缓存get请求

long2ice avatar Oct 26 '21 06:10 long2ice

嗯,而且我发现了Python3.7版本对aioredis支持不好,3.8就没有问题,但暂时先不更新了,有计划后期加上缓存post请求吗?

38602629 avatar Oct 26 '21 14:10 38602629

Request handling other than GET is part of #75.

mjpieters avatar May 14 '23 22:05 mjpieters