You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added in #354, the weather source is yr.no. Yr requires that the responses from their API are cached. We should narrow down the coordinates to a bigger area, then cache it in Redis for a few hours. Redis supports expiry of values, which is nice.
I've separated it into smaller tasks:
Make redis available to weather.ts route
Make sure redis is still available to middleware.ts
Remove a few decimals from the coordinates for them to be less accurate and cover a bigger area
Store the coordinates and summary, max_temp and min_temp in redis. Expire after a few hours.
On request to weather API, check if we have a cached version of the response, if so return that
Document this
To be clear, I am not suggesting that all of these changes have their own PR, all of them should be in one PR.
The text was updated successfully, but these errors were encountered:
Added in #354, the weather source is yr.no. Yr requires that the responses from their API are cached. We should narrow down the coordinates to a bigger area, then cache it in Redis for a few hours. Redis supports expiry of values, which is nice.
I've separated it into smaller tasks:
weather.ts
routemiddleware.ts
summary
,max_temp
andmin_temp
in redis. Expire after a few hours.To be clear, I am not suggesting that all of these changes have their own PR, all of them should be in one PR.
The text was updated successfully, but these errors were encountered: