Skip to content

Commit a4f1db1

Browse files
chore: cache catalogs for 6 hours
1 parent 302813c commit a4f1db1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/api/endpoints/catalogs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ def _get_limits() -> tuple[int, int]:
193193
logger.info(f"Found {len(recommendations)} recommendations for {type}")
194194

195195
logger.info(f"Returning {len(recommendations)} items for {type}")
196-
# Avoid serving stale results; revalidate on each request
197-
response.headers["Cache-Control"] = "no-cache"
196+
response.headers["Cache-Control"] = "public, max-age=21600" # 6 hours
198197
cleaned = [_clean_meta(m) for m in recommendations]
199198
return {"metas": cleaned}
200199

0 commit comments

Comments
 (0)