Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document and export caching of API responses #22

Closed
5 tasks
GregorDeCillia opened this issue Jan 20, 2022 · 1 comment
Closed
5 tasks

Document and export caching of API responses #22

GregorDeCillia opened this issue Jan 20, 2022 · 1 comment
Labels
docs Improvements or additions to documentation
Milestone

Comments

@GregorDeCillia
Copy link
Contributor

GregorDeCillia commented Jan 20, 2022

For quite some time there is a hidden feature that allows caching of API responses from the STATcube REST API. This is very useful for our internal web application and we will have to decide how we deal with this in the upcoming CRAN release.

Leaving it as a hidden feature might create a bad impression during reviews. Removing it would make it necessary to implement the caching logic elsewhere, which might be tricky. Therefore, it is probably best to document and export the behavior. Documentation is already available in ?sc_cache.

One problem with the current implementation is that the hashes are created via serialize() and therefore they are not reusable in different R versions. It would be very handy to use something like digest::digest() but adding another dependency package just for the hashes seems unnecessary. Maybe tools::md5sum() could be used in a different way to get a satisfying result.

TODOs

  • review reference documentation
  • think about creation of hashes
  • Add @export to make the caching available without environment variables
  • Remove @internal to include the man pages in the index page of the documentation
  • Maybe add something similar to od_cache_summary() which provides an overview about the cache contents. This would probably require some kind of cache_index.csv so we don't need to parse the cache entries.
@GregorDeCillia GregorDeCillia added the docs Improvements or additions to documentation label Jan 20, 2022
@GregorDeCillia GregorDeCillia added this to the Version 1.0 milestone Jan 20, 2022
@GregorDeCillia
Copy link
Contributor Author

GregorDeCillia commented Jan 20, 2022

this issues has been converted to PR #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant