R/cache.R
Only works if the cache
is in a folder called .drake/
.
get_cache(path = getwd(), search = TRUE, verbose = drake::default_verbose(), force = FALSE, fetch_cache = NULL)
path | Root directory of the drake project,
or if |
---|---|
search | logical. If |
verbose | logical or numeric, control printing to the console.
Use
|
force | logical, whether to load the cache despite any back compatibility issues with the running version of drake. |
fetch_cache | character vector containing lines of code.
The purpose of this code is to fetch the |
A drake/storr cache in a folder called .drake/
,
if available. NULL
otherwise.
this_cache()
, new_cache()
,
recover_cache()
, config()
# NOT RUN { test_with_dir("Quarantine side effects.", { clean(destroy = TRUE) # No cache is available. get_cache() # NULL load_basic_example() # Get the code with drake_example("basic"). make(my_plan) # Run the project, build the targets. x <- get_cache() # Now, there is a cache. # List the objects readable from the cache with readd(). x$list() # Or x$list(namespace = x$default_namespace) }) # }