The $10 ADSBx BASIC tier has NO hard limit and bills $0.0015/request over 10k/month, so the cache TTL must guarantee we stay under. Widened the cache window 5→10 min: since proxy_cache_lock coalesces all requests into ONE upstream call per window, this caps upstream at ~144 calls/day (~4.4k/month, <half the 10k cap) regardless of visitors or poll rate. Prod nginx also got proxy_cache_lock_timeout/age for a hard single-flight guarantee even under a slow upstream. Dev serve.py ADSBX_CACHE_SEC 300→600 to match. Frontend poll stays 5 min for display freshness (cheap cache hits; the server cache governs quota). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| layers | ||
| config.js | ||
| lib.js | ||
| main.js | ||
| ui.js | ||