ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

Memoise download functions #67

Closed boshek closed 3 years ago

boshek commented 5 years ago

We should consider adding a memoise ability to any download function.

This cache's the output in a session so that unless the parameters have changed, identical download calls will only be downloaded once per session. It is fairly easy to implement and can provide a reasonable buffer to repeated identical downloads.

Here is the memoise package: https://github.com/r-lib/memoise

steffilazerte commented 5 years ago

Excellent idea

boshek commented 5 years ago

I now wonder if this isn't the best solution as it could have some odd behaviours with such high frequency updates as the weather data. Something like this would be better but it isn't on CRAN: https://github.com/ropensci/bowerbird

maelle commented 4 years ago

A WIP package by @sckott might be relevant: https://github.com/ropensci/webmiddens

steffilazerte commented 3 years ago

For now we're using memoise, with a cache expiration of 24hrs. But I'm waiting on webmiddens for sure!

sckott commented 3 years ago

webmiddens won't get any more attention

steffilazerte commented 3 years ago

Booo, but good to know! Thanks