% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasus_catalog.R
\name{datasus_cache_dir}
\alias{datasus_cache_dir}
\title{Resolve the datasusr cache directory}
\usage{
datasus_cache_dir(cache_dir = NULL)
}
\arguments{
\item{cache_dir}{Optional cache directory supplied by the caller.}
}
\value{
A single path string.
}
\description{
Returns the active cache directory path. Checks, in order: the \code{cache_dir}
argument, the \code{DATASUSR_CACHE_DIR} environment variable, the
\code{datasusr.cache_dir} option, and finally a session-scoped subdirectory of
\code{\link[=tempdir]{tempdir()}}. To opt in to a persistent cache across sessions, set the
\code{DATASUSR_CACHE_DIR} environment variable, the \code{datasusr.cache_dir} option,
or pass \code{cache_dir} explicitly (for example,
\code{tools::R_user_dir("datasusr", "cache")}).
}
\examples{
datasus_cache_dir()
}
