removes every json and qs2 files found by sourcoise_status() unless a specific tibble (filtered from sourcoise_status()) is passed as an argument.
Arguments
- what2keep
(–) a string (such as "last", the default or "nothing" clears all or "all" removes only non sourcoise files) or a tibble such as the one obtained by
sourcoise_status(), possibly filtered for the files you whish to keep- root
to force root, not recommended (expert use only)
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
dir <- tempdir()
set_sourcoise_root(dir)
#> /tmp/Rtmp4DcgLO
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()
#> character(0)
sourcoise_status()
#> # A tibble: 1 × 6
#> src priority date data_date file_size json_file
#> <chr> <int> <dttm> <dttm> <chr> <chr>
#> 1 some_dat… 10 2025-12-12 14:21:29 2025-12-12 14:21:28 242 B .sourcoi…
