gisco_clear_cache: Clear your 'giscoR' cache dir

View source: R/gisco-cache.R

gisco_clear_cacheR Documentation

Clear your giscoR cache dir

Description

Use this function with caution. This function would clear your cached data and configuration, specifically:

  • Deletes the giscoR config directory (tools::R_user_dir("giscoR", "config")).

  • Deletes the cache_dir directory.

  • Deletes the values on stored on Sys.getenv("GISCO_CACHE_DIR").

Usage

gisco_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)

Arguments

config

if TRUE, will delete the configuration folder of giscoR.

cached_data

If this is set to TRUE, it will delete your cache_dir and all its content.

verbose

logical. If TRUE displays informational messages.

Details

This is an overkill function that is intended to reset your status as it you would never have installed and/or used giscoR.

Value

Invisible. This function is called for its side effects.

See Also

tools::R_user_dir()

Other cache utilities: gisco_set_cache_dir()

Examples


# Don't run this! It would modify your current state
## Not run: 
my_cache <- gisco_detect_cache_dir()

# Set an example cache
ex <- file.path(tempdir(), "example", "cache")
gisco_set_cache_dir(ex, verbose = FALSE)

# Restore initial cache
gisco_clear_cache(verbose = TRUE)

gisco_set_cache_dir(my_cache)
identical(my_cache, gisco_detect_cache_dir())

## End(Not run)

giscoR documentation built on Dec. 10, 2025, 9:08 a.m.