Use this function with caution. This function will clear your cached data and configuration, specifically:
Deletes the CatastRo config directory (
tools::R_user_dir("CatastRo", "config")).Deletes the
cache_dirdirectory.Deletes the values stored on
Sys.getenv("CATASTROESP_CACHE_DIR").
Arguments
- config
if
TRUE, will delete the configuration folder of CatastRo.- cached_data
If this is set to
TRUE, it will delete yourcache_dirand all its content.- verbose
logical. If
TRUEdisplays informational messages.
Details
This is an overkill function that is intended to reset your status as if you would never have installed and/or used CatastRo.
See also
Other cache utilities:
catr_set_cache_dir()
Examples
# Don't run this! It would modify your current state
# \dontrun{
my_cache <- catr_detect_cache_dir()
#> ℹ /tmp/Rtmp8NWk5M/CatastRo
# Set an example cache
ex <- file.path(tempdir(), "example", "cache")
catr_set_cache_dir(ex, verbose = FALSE)
# Restore initial cache
catr_clear_cache(verbose = TRUE)
#> ! CatastRo data deleted: /tmp/Rtmp8NWk5M/example/cache (0 bytes).
catr_set_cache_dir(my_cache)
#> ℹ CatastRo cache dir is /tmp/Rtmp8NWk5M/CatastRo.
#> ℹ To install your `cache_dir` path for use in future sessions run this function with `install = TRUE`.
identical(my_cache, catr_detect_cache_dir())
#> ℹ /tmp/Rtmp8NWk5M/CatastRo
#> [1] TRUE
# }
