mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
fix: example coroutine object is not iterable
This commit is contained in:
@@ -43,9 +43,9 @@ async def get_data(request: Request, response: Response):
|
||||
|
||||
@app.get("/blocking")
|
||||
@cache(namespace="test", expire=10)
|
||||
def blocking():
|
||||
async def blocking():
|
||||
time.sleep(5)
|
||||
return dict(ret=get_ret())
|
||||
return dict(ret=await get_ret())
|
||||
|
||||
|
||||
@app.get("/datetime")
|
||||
|
||||
Reference in New Issue
Block a user