clean_boundary_cache.RdRemove old boundary files from the cache to free up disk space.
clean_boundary_cache(
keep_latest_n = 1,
older_than_days = NULL,
territorial_level = "all",
dry_run = FALSE,
verbose = TRUE
)Integer. Keep this many most recent versions for each territorial level. Default is 1 (keep only latest).
Integer. Remove versions older than this many days.
If NULL (default), only keep_latest_n is used.
Character. Clean specific territorial level or "all" (default).
Logical. If TRUE, show what would be removed without actually removing. Default is FALSE.
Logical. Print progress messages? Default is TRUE.
A character vector of removed file paths (invisibly).
if (FALSE) { # \dontrun{
# Preview what would be removed (dry run)
clean_boundary_cache(dry_run = TRUE)
# Keep only the latest version of each territorial level
clean_boundary_cache(keep_latest_n = 1)
# Remove versions older than 365 days
clean_boundary_cache(older_than_days = 365, keep_latest_n = NULL)
# Clean only municipalities
clean_boundary_cache(
territorial_level = "comuni",
keep_latest_n = 2
)
} # }