We are interesting in using your API to overlay weather data on top of Google maps in our application. We have noticed, however, that many requests are made over and over again for the same overlay tile.
There is no cache-control header being returned in the response from the OpenWatherMap API causing the map tile to be fetched through an HTTP request every time it is needed. In contrast the Google map tiles make use of the browser cache which improves performance and reduces our load on their servers (and the load on our wallets!).
Is there any way we can specify in our request that we would like to cache the map overlay tiles? If so, how can we make use of it? Also if this is possible, how can we make sure that the cache is properly invalidated when new overlay tiles are available?
The weather layers are actually cached.
When you download the map it makes a request to specific number of tiles on specific zoom.
When you change zoom other ser of tiles are requested. This is a leaflet approach.