drake_gc {drake} | R Documentation |
Do garbage collection on the drake cache.
![[Stable]](../help/figures/lifecycle-stable.svg)
Description
Garbage collection removes obsolete target values from the cache.
Usage
drake_gc(
path = NULL,
search = NULL,
verbose = NULL,
cache = drake::drake_cache(path = path),
force = FALSE
)
Arguments
path |
Path to a |
search |
Deprecated. |
verbose |
Deprecated on 2019-09-11. |
cache |
drake cache. See |
force |
Logical, whether to load the cache despite any back compatibility issues with the running version of drake. |
Details
Caution: garbage collection actually removes data
so it is no longer recoverable with drake_history()
or
make(recover = TRUE)
. You cannot undo this operation.
Use at your own risk.
Value
NULL
See Also
Examples
## 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 the targets.
# At this point, check the size of the '.drake/' cache folder.
# Clean without garbage collection.
clean(garbage_collection = FALSE)
# The '.drake/' cache folder is still about the same size.
drake_gc() # Do garbage collection on the cache.
# The '.drake/' cache folder should have gotten much smaller.
}
})
## End(Not run)
[Package drake version 7.13.10 Index]