Skip to content

Commit 6b515ad

Browse files
author
yashksaini-coder
committed
fix: 🐛 increase cache expiration time for stock info and update fastapi version in requirements
1 parent cb4e9cf commit 6b515ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def read_top_stocks(cache: RedisBackend = Depends(get_cache)):
8484
stock = " ".join(top_stocks)
8585
stock_info = get_top_stocks(stock)
8686

87-
await cache.set(cache_key, json.dumps(stock_info), 5)
87+
await cache.set(cache_key, json.dumps(stock_info), 10)
8888
return stock_info
8989

9090
@app.get("/health") # Changed to GET since it's retrieving status

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dnspython==2.7.0
1212
docstring_parser==0.16
1313
duckduckgo_search==7.3.2
1414
email_validator==2.2.0
15-
fastapi==0.115.8
15+
fastapi
1616
fastapi-cache2==0.2.2
1717
fastapi-cli==0.0.7
1818
Flask==3.1.0

0 commit comments

Comments
 (0)