Learn R Programming

drake (version 5.0.0)

new_cache: Make a new drake cache.

Description

Uses the storr_rds() function from the storr package.

Usage

new_cache(path = drake::default_cache_path(), verbose = 1, type = NULL,
  short_hash_algo = drake::default_short_hash_algo(),
  long_hash_algo = drake::default_long_hash_algo(), ...)

Arguments

path

file path to the cache if the cache is a file system cache.

verbose

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

type

deprecated argument. Once stood for cache type. Use storr to customize your caches instead.

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()

...

other arguments to the cache constructor

Value

A newly created drake cache as a storr object.

See Also

default_short_hash_algo, default_long_hash_algo, make

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine new_cache() side effects.", {
clean(destroy = TRUE) # Should not be necessary.
unlink("not_hidden", recursive = TRUE) # Should not be necessary.
cache1 <- new_cache() # Creates a new hidden '.drake' folder.
cache2 <- new_cache(path = "not_hidden", short_hash_algo = "md5")
clean(destroy = TRUE, cache = cache2)
})
# }

Run the code above in your browser using DataLab