mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 03:32:19 +00:00
A cached answer or a malformed request costs OpenSky nothing, so neither is charged to the 30/min window. During a /tracks cooldown only a cached track is replayed; an old cached error gives way to the cooldown refusal. The 429 that arms the cooldown is no longer cached, so it and its repeats carry Retry-After. No token is minted unless the upstream is called.
802 B
802 B
- Stop the OpenSky track-backfill proxy from turning a varied
icao24into unbounded upstream spend./api/flights/trackcarries an always-on 30-per-minute per-client limiter (90 global) on upstream calls (a cached answer or a malformed request is not charged), and a429from OpenSky/tracks/allnow starts a cooldown for that credit bucket: until OpenSky's retry-after passes, any cached track is served and other lookups are answered429locally instead of asking for 4 more credits. The/tracks/*bucket is separate from the/states/*one/api/flightsspends, so a flights cooldown does not block backfill. The existing 60-second per-key cache bounds memory, not spend. Single-aircraft backfill, issued once per selected contact, is unaffected (daikaginza, #685).