Deletes locally cached data files downloaded by the package. By default
all cached files are removed; pass max_age_days to remove only files
older than that.
Usage
hmrc_clear_cache(max_age_days = NULL)
Arguments
- max_age_days
Numeric or NULL. If NULL (default), every cached
file is removed. If a number, only files modified more than that many
days ago are removed.
Value
Invisibly returns the number of files deleted.
Examples
# \donttest{
op <- options(hmrc.cache_dir = tempdir())
hmrc_clear_cache()
#> Deleted 6 cached files.
hmrc_clear_cache(max_age_days = 30)
#> No files older than 30 days found.
options(op)
# }