drake
cache.R/cache.R
Uses the storr_rds()
function
from the storr
package.
new_cache(path = drake::default_cache_path(), verbose = drake::default_verbose(), type = NULL, short_hash_algo = drake::default_short_hash_algo(), long_hash_algo = drake::default_long_hash_algo(), ...)
path | file path to the cache if the cache is a file system cache. |
---|---|
verbose | logical or numeric, control printing to the console.
Use
|
type | deprecated argument. Once stood for cache type.
Use |
short_hash_algo | short hash algorithm for the cache.
See |
long_hash_algo | long hash algorithm for the cache.
See |
... | other arguments to the cache constructor |
A newly created drake cache as a storr object.
default_short_hash_algo()
,
default_long_hash_algo()
,
make()
# 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) }) # }