| catr_clear_cache | R Documentation |
Use this function with caution. Depending on its arguments, this function:
Deletes the CatastRo configuration directory when
config = TRUE
(tools::R_user_dir("CatastRo", "config")).
Deletes the cache_dir directory and its contents when
cached_data = TRUE.
Always clears the CATASTROESP_CACHE_DIR environment variable.
catr_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)
config |
If |
cached_data |
If |
verbose |
Logical. Whether to display informational messages. |
With config = TRUE and cached_data = TRUE, this function resets the
cache state as if you had never used CatastRo.
NULL, invisibly. This function is called for its
side effects.
tools::R_user_dir() defines platform-specific user directories.
Manage the local cache:
catr_set_cache_dir()
# Don't run this! It modifies your current state
## Not run:
my_cache <- catr_detect_cache_dir()
# 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)
catr_set_cache_dir(my_cache)
identical(my_cache, catr_detect_cache_dir())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.