Learn R Programming

edgemodelr (version 0.1.6)

edge_clean_cache: Clean up cache directory and manage storage

Description

Remove outdated model files from the cache directory to comply with CRAN policies about actively managing cached content and keeping sizes small.

Usage

edge_clean_cache(
  cache_dir = NULL,
  max_age_days = 30,
  max_size_mb = 500,
  interactive = TRUE,
  verbose = TRUE
)

Value

Invisible list of deleted files

Arguments

cache_dir

Cache directory path (default: user cache directory)

max_age_days

Maximum age of files to keep in days (default: 30)

max_size_mb

Maximum total cache size in MB (default: 500)

interactive

Whether to ask for user confirmation before deletion

verbose

Whether to print status messages (default: TRUE)

Examples

Run this code
if (FALSE) {
# Clean cache files older than 30 days
edge_clean_cache()

# Clean cache with custom settings
edge_clean_cache(max_age_days = 7, max_size_mb = 100)
}

Run the code above in your browser using DataLab