api: add tooling for keeping a local cache
This commit is contained in:
parent
51349c297b
commit
bc7e74f28d
4 changed files with 22 additions and 0 deletions
|
|
@ -69,3 +69,10 @@ def persist_auth_state(oidc_client: OpenidClient, resp: Response, tokens: TokenS
|
|||
|
||||
CurrentUser = Annotated[Optional[models.CurrentUser], Depends(get_current_user)]
|
||||
|
||||
|
||||
def get_cache(req: Request) -> Cache:
|
||||
return req.app.extra["cache"]
|
||||
|
||||
|
||||
Cache = Annotated[Cache, Depends(get_cache)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue