You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've wrapped some simpleCache calls in functions so that I can reuse a cache across scripts without assuming (with loadCaches) that a cache already exists while also trying to avoid duplication of the code responsible for creating the cache. This exploits the hook provided by the fact that projectInit sources the 00-init.R file but does so at the cost of cluttering that file. It'd be cool to have a similar hook for cache creation functions. Pragmatically, modestly related to databio/simpleCache#18
The text was updated successfully, but these errors were encountered:
Right, exactly what buildDir was originally intended to do. In this setting, you specify a directory, and then just provide a file with the same name as the cache, and that's where your instructions are.
So, not a function, but a file, but otherwise, exactly what you're saying. You could make your buildDir to be src/build-caches and then have a file:
src/build-caches/aggregateData.R
Then simpleCache("aggregateDate.R") will automatically check in src/build-caches/aggregateData.R since you did not provide an instruction.
I've wrapped some
simpleCache
calls in functions so that I can reuse a cache across scripts without assuming (withloadCaches
) that a cache already exists while also trying to avoid duplication of the code responsible for creating the cache. This exploits the hook provided by the fact thatprojectInit
sources the00-init.R
file but does so at the cost of cluttering that file. It'd be cool to have a similar hook for cache creation functions. Pragmatically, modestly related to databio/simpleCache#18The text was updated successfully, but these errors were encountered: