% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download_data.R
\name{set_iobr_cache_dir}
\alias{set_iobr_cache_dir}
\title{Set IOBR Cache Directory}
\usage{
set_iobr_cache_dir(path, create = TRUE)
}
\arguments{
\item{path}{Character string. The path to the cache directory.}

\item{create}{Logical. Whether to create the directory if it doesn't exist.
Default: TRUE.}
}
\value{
Invisibly returns the cache directory path.
}
\description{
Sets a custom cache directory for IOBR downloaded data.
This is useful when you want to store cached data in a specific location,
such as a shared network drive or a custom directory.

To use the standard system cache location (persistent across sessions),
you can use: `set_iobr_cache_dir(tools::R_user_dir("IOBR", which = "cache"))`.
}
\examples{
\donttest{
# Set a custom cache directory (use tempdir() for examples)
set_iobr_cache_dir(tempdir())

# Use standard system cache (persistent)
# set_iobr_cache_dir(tools::R_user_dir("IOBR", which = "cache"))

# Check the current cache directory
get_iobr_cache_dir()

# Download data will now use the custom cache
data <- download_iobr_data("lm22")
}
}
