mindat_cache_return_or_setup {OpenMindat} | R Documentation |
Check whether the current environment has the cached function named varname,if has, return it. if not, setup up a new cache function named varname.
mindat_cache_return_or_setup(varname,setupfun)
varname |
string. |
setupfun |
boolean, if the cached is a setup function. |
If the varname is found in current environment cache, return cached function. If not, eval the function and return cached function.
aep<- api_end_points<-mindat_cache_return_or_setup('api_end_points', function(){return (list()) })