Removes files cached by morie under
tools::R_user_dir("morie", "cache") (or
MORIE_CACHE_DIR if set). morie's default behaviour writes
caches to a session-scoped tempdir()
subdirectory, so this function only matters if you have explicitly
opted in to persistent caching by passing
cache_dir = morie_cache_dir(...) to any of the morie
fetchers.
Usage
morie_cache_clear(subdir = NULL, confirm = interactive())
Arguments
- subdir
Optional subdirectory under the morie cache root to
target (e.g. "siu", "tps"). If NULL, removes
the entire morie persistent-cache root.
- confirm
If TRUE (default in interactive sessions),
prompts the user before deleting. Set FALSE in scripts /
batch use to skip the prompt.
Value
Invisibly, the number of files removed.
Examples
# \donttest{
# Non-interactive: skip the confirmation prompt.
morie_cache_clear("siu", confirm = FALSE)
# }