ropensci / rb3

A bunch of downloaders and parsers for data delivered from B3
https://docs.ropensci.org/rb3/
Other
71 stars 28 forks source link

Update historical data in cache #49

Open wilsonfreitas opened 2 years ago

wilsonfreitas commented 2 years ago

Create an engine to update historical data in cache.

Maybe the binary data, already processed inside a data.frame, could be saved in a SQLite database like a BLOB.

Considering that all data downloaded is indexed to a reference date, one alternative is: update the cache with all missing reference dates.

Example:

update_cache(template)
#> Updating <template> cache with <n> dates

When the cache is empty

update_cache(template)
#> x Error no cache for template <template>
check_cache(template)
#> cache for <template> is up to date