At the moment the cache is automatically deployed to the directory in which function are run. This is not good practice as the user should have a say in any files being saved to their computer. It does offer some nice benefits in that data is stored between R sessions (which is good when doing a lot of things in bash).
An alternative might be to default to set the cache as a temporary folder but to provide an option to set the cache globally. This could either be done using a variable for each function (which would get tedious to set each time) or using a function that sets the cache and then saves its location to a global variable. A Sys.getenv call could then be the default for the cache argument (similar to how slackr works) in each function falling back to a tmp cache if not found.
At the moment the cache is automatically deployed to the directory in which function are run. This is not good practice as the user should have a say in any files being saved to their computer. It does offer some nice benefits in that data is stored between R sessions (which is good when doing a lot of things in bash).
An alternative might be to default to set the cache as a temporary folder but to provide an option to set the cache globally. This could either be done using a variable for each function (which would get tedious to set each time) or using a function that sets the cache and then saves its location to a global variable. A Sys.getenv call could then be the default for the cache argument (similar to how
slackr
works) in each function falling back to a tmp cache if not found.What do people think?