rescue_cache | R Documentation |
storr
-related errors.
Sometimes, storr
caches may have
dangling orphaned files that prevent you from loading or cleaning.
This function tries to remove those files so you can use the
cache normally again.
rescue_cache(
targets = NULL,
path = NULL,
search = NULL,
verbose = NULL,
force = FALSE,
cache = drake::drake_cache(path = path),
jobs = 1,
garbage_collection = FALSE
)
targets |
Character vector, names of the targets to rescue.
As with many other drake utility functions, the word |
path |
Character.
Set |
search |
Deprecated. |
verbose |
Deprecated on 2019-09-11. |
force |
Deprecated. |
cache |
A |
jobs |
Number of jobs for light parallelism (disabled on Windows). |
garbage_collection |
Logical, whether to do garbage collection
as a final step. See |
Nothing.
drake_cache()
, cached()
,
drake_gc()
, clean()
## Not run:
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
load_mtcars_example() # Get the code with drake_example("mtcars").
make(my_plan) # Run the project, build targets. This creates the cache.
# Remove dangling cache files that could cause errors.
rescue_cache(jobs = 2)
# Alternatively, just rescue targets 'small' and 'large'.
# Rescuing specific targets is usually faster.
rescue_cache(targets = c("small", "large"))
}
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.