Use this function with caution. It clears cached data and configuration, specifically:
Deletes the CatastRoNav configuration directory (
tools::R_user_dir("CatastRoNav", "config")).Deletes the
cache_dirdirectory.Clears the
CATASTRONAV_CACHE_DIRenvironment variable.
See also
Manage the local cache:
catrnav_set_cache_dir()
Examples
# Caution! This modifies your current state.
# \dontrun{
my_cache <- catrnav_detect_cache_dir()
#> ℹ /tmp/RtmpqpGbxS/CatastRoNav
example_cache <- file.path(tempdir(), "example", "cache")
catrnav_set_cache_dir(example_cache, verbose = FALSE)
catrnav_clear_cache(verbose = TRUE)
#> ! Deleted CatastRoNav cached data from /tmp/RtmpqpGbxS/example/cache ("0 bytes").
# Restore the initial cache.
catrnav_set_cache_dir(my_cache)
#> ℹ CatastRoNav cache directory is /tmp/RtmpqpGbxS/CatastRoNav.
#> ℹ To reuse this cache directory in future sessions, set `install` to `TRUE`.
identical(my_cache, catrnav_detect_cache_dir())
#> ℹ /tmp/RtmpqpGbxS/CatastRoNav
#> [1] TRUE
# }
