Skip to content

Commit

Permalink
Reduce cache times
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Feb 11, 2025
1 parent be96b29 commit e0a0a5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deadlock_data_api/routers/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def player_rank(
[RateLimit(limit=10, period=60)],
[RateLimit(limit=20, period=1)],
)
res.headers["Cache-Control"] = "public, max-age=900"
res.headers["Cache-Control"] = "public, max-age=60"
account_id = utils.validate_steam_id(account_id)
account_groups = utils.validate_account_groups(
account_groups, req.headers.get("X-API-Key", req.query_params.get("api_key"))
Expand Down Expand Up @@ -339,7 +339,7 @@ def player_match_history(
[RateLimit(limit=100, period=1)],
[RateLimit(limit=1000, period=1)] if not account_groups else [],
)
res.headers["Cache-Control"] = "public, max-age=900"
res.headers["Cache-Control"] = "public, max-age=60"
account_id = utils.validate_steam_id(account_id)
account_groups = utils.validate_account_groups(
account_groups, req.headers.get("X-API-Key", req.query_params.get("api_key"))
Expand Down
2 changes: 1 addition & 1 deletion deadlock_data_api/routers/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def player_match_history(
[RateLimit(limit=100, period=1)],
[RateLimit(limit=1000, period=1)] if not account_groups else [],
)
res.headers["Cache-Control"] = "public, max-age=900"
res.headers["Cache-Control"] = "public, max-age=60"
account_id = utils.validate_steam_id(account_id)
account_groups = utils.validate_account_groups(
account_groups, req.headers.get("X-API-Key", req.query_params.get("api_key"))
Expand Down

0 comments on commit e0a0a5b

Please sign in to comment.