R/clean.R
The cache is a key-value store.
By default, the clean()
function removes
values, but not keys.
Garbage collection removes the remaining dangling files.
drake_gc(path = getwd(), search = TRUE, verbose = drake::default_verbose(), cache = NULL, force = FALSE)
path | Root directory of the drake project,
or if |
---|---|
search | logical. If |
verbose | logical or numeric, control printing to the console.
Use
|
cache | drake cache. See |
force | logical, whether to load the cache despite any back compatibility issues with the running version of drake. |
NULL
# NOT RUN { test_with_dir("Quarantine side effects.", { load_basic_example() # Get the code with drake_example("basic"). 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. }) # }