From 9e3c9816c58e293e167914d1c059a6ab345a504a Mon Sep 17 00:00:00 2001 From: heliumbrain Date: Thu, 15 Jul 2021 23:15:01 +0200 Subject: [PATCH] Update README.md Updated readme to reflect the changes in aioredis 2.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f83aed..eb75447 100644 --- a/README.md +++ b/README.md @@ -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") ```