% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache-utils.R
\encoding{UTF-8}
\name{catr_clear_cache}
\alias{catr_clear_cache}
\title{Clear your \CRANpkg{CatastRo} cache dir}
\usage{
catr_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)
}
\arguments{
\item{config}{If \code{TRUE}, deletes the configuration folder of
\CRANpkg{CatastRo}.}

\item{cached_data}{If \code{TRUE}, deletes your \code{cache_dir} and all its contents.}

\item{verbose}{Logical. If \code{TRUE}, displays informational messages.}
}
\value{
Invisible. This function is called for its side effects.
}
\description{
\strong{Use this function with caution}. This function clears your cached data
and configuration, specifically:
\itemize{
\item Deletes the \CRANpkg{CatastRo} config directory
(\code{tools::R_user_dir("CatastRo", "config")}).
\item Deletes the \code{cache_dir} directory.
\item Deletes the values stored on \code{Sys.getenv("CATASTROESP_CACHE_DIR")}.
}
}
\details{
This is an overkill function that is intended to reset your status
as if you had never installed and/or used \CRANpkg{CatastRo}.
}
\examples{

# Don't run this! It modifies your current state
\dontrun{
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())
}
}
\seealso{
\code{\link[tools:R_user_dir]{tools::R_user_dir()}}

Other cache utilities:
\code{\link[=catr_set_cache_dir]{catr_set_cache_dir()}}
}
\concept{cache utilities}
