Learn R Programming

drake (version 5.0.0)

recover_cache: Load an existing drake files system cache if it exists or create a new one otherwise.

Description

Does not work with in-memory caches such as storr_environment().

Usage

recover_cache(path = drake::default_cache_path(),
  short_hash_algo = drake::default_short_hash_algo(),
  long_hash_algo = drake::default_long_hash_algo(), force = FALSE,
  verbose = TRUE, fetch_cache = NULL)

Arguments

path

file path of the cache

short_hash_algo

short hash algorithm for the cache. See default_short_hash_algo() and make()

long_hash_algo

long hash algorithm for the cache. See default_long_hash_algo() and make()

force

logical, whether to load the cache despite any back compatibility issues with the running version of drake.

verbose

logical, whether to print the file path of the cache.

fetch_cache

character vector containing lines of code. The purpose of this code is to fetch the storr cache with a command like storr_rds() or storr_dbi(), but customized.

Value

A drake/storr cache.

See Also

new_cache, this_cache, get_cache

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
clean(destroy = TRUE)
load_basic_example() # Get the code with drake_example("basic").
make(my_plan) # Run the project, build all the targets.
x <- recover_cache(".drake") # Recover the project's storr cache.
})
# }

Run the code above in your browser using DataLab