AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
39 stars 3 forks source link

Caching for `show_all` functions #116

Closed mjwestgate closed 2 years ago

mjwestgate commented 2 years ago

The current (December 2021) version of galah_config in the dev branch has a field called valid_fields, which is used to cache valid field names via show_all_fields(). This improves performance by reducing calls to the ALA, but is undesirable for a few reasons:

A potential solution is to cache show_all_ functions elsewhere, possibly hidden from the user, to improve performance. A proposed function name would be galah_cache. This could store data as tibbles within a list, which would render nicely when needed, but also prevent unnecessary calls to the ALA API.