Learn R Programming

drake (version 4.2.0)

configure_cache: Function configure_cache

Description

configure a cache for drake. This is to prepare the cache to be called from make().

Usage

configure_cache(cache, short_hash_algo = NULL, long_hash_algo = NULL,
  clear_progress = FALSE, overwrite_hash_algos = FALSE)

Arguments

cache

cache to configure

short_hash_algo

short hash algorithm for drake. The short algorithm must be among available_hash_algos{}, which is just the collection of algorithms available to the `algo` argument in digest::digest(). See ?default_short_hash_algo for more.

long_hash_algo

short hash algorithm for drake. The long algorithm must be among available_hash_algos{}, which is just the collection of algorithms available to the `algo` argument in digest::digest(). See ?default_long_hash_algo for more.

clear_progress

logical, whether to clear the recorded build progress if this cache was used for previous calls to make()

overwrite_hash_algos

logical, whether to try to overwrite the hash algorithms in the cache with any user-specified ones.

See Also

default_short_hash_algo, default_long_hash_algo

Examples

Run this code
# NOT RUN {
load_basic_example()
config <- make(my_plan, return_config = TRUE)
cache <- config$cache
long_hash(cache)
cache <- configure_cache(
  cache = cache,
  long_hash_algo = "murmur32",
  overwrite_hash_algos = TRUE
)
long_hash(cache) # long hash algorithm. See ?default_long_hash_algorithm.
make(my_plan) # Changing the long hash puts targets out of date.
# }

Run the code above in your browser using DataLab