use lifespan
This commit is contained in:
parent
d6a5f4e2cc
commit
7c19b3f324
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ async def lifespan(_app: FastAPI):
|
|||
yield
|
||||
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
app.state.cache = {}
|
||||
|
||||
|
||||
|
|
Reference in a new issue