Skip to content

Commit

Permalink
Fix cache on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
itsamirhn committed Jan 2, 2023
1 parent 3b19eb9 commit a5db6e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ dmypy.json
# Cython debug symbols
cython_debug/

.deta
6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

app = FastAPI()

FastAPICache.init(InMemoryBackend())

BONBAST_URL = "https://www.bonbast.com"

app.add_middleware(
Expand Down Expand Up @@ -130,7 +132,3 @@ async def read_archive_range(
price_range[date] = price
return price_range


@app.on_event("startup")
async def startup():
FastAPICache.init(InMemoryBackend())

0 comments on commit a5db6e8

Please sign in to comment.