Learn R Programming

drake (version 4.4.0)

new_cache: Function new_cache

Description

Make a new drake cache. Could be any type of cache in cache_types().

Usage

new_cache(path = drake::default_cache_path(),
  type = drake::default_cache_type(),
  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.

type

character scalar, type of the drake cache. Must be among the list of supported caches in cache_types().

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

See Also

default_short_hash_algo, default_long_hash_algo, make, cache_types, in_memory_cache_types

Examples

Run this code
# NOT RUN {
cache1 <- new_cache() # Creates a new hidden '.drake' folder.
cache2 <- new_cache(path = "not_hidden", short_hash_algo = "md5")
# }
# NOT RUN {
e <- new.env()
ls(e)
y <- new_cache(type = "storr_environment", envir = e)
ls(e)
ls(e)
# }

Run the code above in your browser using DataLab