perf: shared httpx client, gzip, overlay cache-control
Reuse one TLS pool for overlay upstreams (8s/3s timeouts). Gzip JSON over 1 KB. Aircraft/vessels Cache-Control max-age=5, alerts/perimeters 30. Lifespan replaces deprecated on_event startup.
This commit is contained in:
parent
8f89994201
commit
435f63e473
3 changed files with 67 additions and 29 deletions
|
|
@ -36,3 +36,4 @@ def test_vessels_empty_without_ais_key():
|
|||
resp = asyncio.run(_get("/api/vessels"))
|
||||
assert resp.status_code == 200
|
||||
assert resp.json() == []
|
||||
assert "max-age" in (resp.headers.get("cache-control") or "").lower()
|
||||
|
|
|
|||
Loading…
Reference in a new issue