stevecondylios / priceR

Economics and Pricing in R
https://stevecondylios.github.io/priceR/
Other
59 stars 7 forks source link

Implement cache on calls to external APIs #12

Open stevecondylios opened 4 years ago

stevecondylios commented 4 years ago

Best practice for API use is to implement caching.

Use R.cache; particularly addMemoization(fcn, envir=parent.frame(), ...), which creates a copy of a function such that its results are memoized.