Skip to content

Commit 745c288

Browse files
committed
chore: bump analyze cache TTL from 5 min to 24 hours
Directory structure of a repo barely changes (new package added maybe once a month). 24hr cache saves GitHub API calls at ~3-5KB per entry. 1000 cached repos = 5MB Redis. Effectively free.
1 parent 8da4376 commit 745c288

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/routes/repos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def validate_url(cls, v: str) -> str:
295295
return v
296296

297297

298-
_ANALYZE_CACHE_TTL = 300 # 5 minutes, same as validate-repo
298+
_ANALYZE_CACHE_TTL = 86400 # 24 hours -- directory structure rarely changes
299299

300300

301301
@router.post("/analyze")

0 commit comments

Comments
 (0)