mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 13:07:53 +00:00
Fix sync example
This commit is contained in:
@@ -46,8 +46,8 @@ 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():
|
def blocking():
|
||||||
time.sleep(5)
|
time.sleep(2)
|
||||||
return dict(ret=get_ret())
|
return dict(ret=42)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/datetime")
|
@app.get("/datetime")
|
||||||
|
|||||||
Reference in New Issue
Block a user