Since weather doesn't - usually - change abruptly, a cache with (configurable) time based expiration would be a nice addition to make sure that multiple queries for the same location wouldn't reach out to the OpenWeather API. This would surely save bandwidth and it would take longer to hit the query quota.
Since weather doesn't - usually - change abruptly, a cache with (configurable) time based expiration would be a nice addition to make sure that multiple queries for the same location wouldn't reach out to the OpenWeather API. This would surely save bandwidth and it would take longer to hit the query quota.
https://github.com/rexor12/holobot/blob/f3fc1ce399c94d8712120a26a8632dd00da45101/holobot/extensions/weather/weather_client.py#L31