Always removes files in .sourcoise folders that do not belong to the cache (orphans), then removes cache files according to what2keep.
Value
list of cleared files, plus a side-effect as specified cache files are deleted (no undo possible)
See also
Other sourcoise:
sourcoise(),
sourcoise_clear_all(),
sourcoise_refresh(),
sourcoise_reset(),
sourcoise_status()
Examples
if (FALSE) { # rlang::is_installed("insee")
dir <- tempdir()
set_sourcoise_root(dir)
fs::file_copy(
fs::path_package("sourcoise", "some_data.R"),
dir,
overwrite = TRUE)
# Force execution
data <- sourcoise("some_data.R", force_exec = TRUE)
# we then clear all caches
sourcoise_clear()
sourcoise_status()
}
