mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
Merge pull request #86 from vvanglro/fix/example
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")
|
@app.get("/blocking")
|
||||||
@cache(namespace="test", expire=10)
|
@cache(namespace="test", expire=10)
|
||||||
def blocking():
|
async def blocking():
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
return dict(ret=get_ret())
|
return dict(ret=await get_ret())
|
||||||
|
|
||||||
|
|
||||||
@app.get("/datetime")
|
@app.get("/datetime")
|
||||||
|
|||||||
Reference in New Issue
Block a user