Skip to content

Commit

Permalink
Merge pull request #22 from heliumbrain/master
Browse files Browse the repository at this point in the history
Adapt to aioredis 2.0
  • Loading branch information
long2ice authored Jul 16, 2021
2 parents 7c7aa26 + 9e3c981 commit 0bc8c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def index(request: Request, response: Response):

@app.on_event("startup")
async def startup():
redis = await aioredis.create_redis_pool("redis://localhost", encoding="utf8")
redis = aioredis.from_url("redis://localhost", encoding="utf8", decode_responses=True)
FastAPICache.init(RedisBackend(redis), prefix="fastapi-cache")

```
Expand Down

0 comments on commit 0bc8c6c

Please sign in to comment.