Searching the same city twice in a row (or by multiple users at once) fires a fresh API call each time instead of reusing a recent result. On OpenWeatherMap's free tier this risks hitting rate limits quickly. Add a short-lived cache (e.g. 5–10 min per city) using an in-memory dict or flask-caching.
Searching the same city twice in a row (or by multiple users at once) fires a fresh API call each time instead of reusing a recent result. On OpenWeatherMap's free tier this risks hitting rate limits quickly. Add a short-lived cache (e.g. 5–10 min per city) using an in-memory dict or flask-caching.