% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extdata-lazy-fetch.R
\name{download_extdata_cache}
\alias{download_extdata_cache}
\title{Download one or more soilKey lazy-fetch caches from GitHub Release}
\usage{
download_extdata_cache(
  which = "all",
  release = .SOILKEY_LAZY_FETCH_RELEASE,
  overwrite = FALSE,
  verbose = TRUE
)
}
\arguments{
\item{which}{Character vector of cache names to download.
\code{"all"} (default) downloads every lazy-fetch cache. Valid
names: \code{"afsp_sample"}, \code{"kssl_sample"},
\code{"kssl_nasis_sample"}, \code{"wosis_stratified_sample"}.}

\item{release}{GitHub Release tag to pull from (default
\code{"v0.9.94-data"}). Override only if you maintain a
local mirror.}

\item{overwrite}{If \code{TRUE}, redownload even if the file is
already present in the user cache (default \code{FALSE}).}

\item{verbose}{Print progress (default \code{TRUE}).}
}
\value{
Invisibly, a named character vector of local paths to the
        downloaded files.
}
\description{
soilKey ships four large benchmark caches (KSSL, KSSL+NASIS, AfSP,
WoSIS stratified) that are too large to embed in the CRAN source
tarball. Since v0.9.94 they are pinned to a versioned GitHub Release
and downloaded on demand into the user cache directory at
\code{tools::R_user_dir("soilKey", "data")}.
}
\details{
On first call to any of \code{load_kssl_sample()},
\code{load_kssl_nasis_sample()}, \code{load_afsp_sample()}, or
\code{load_wosis_stratified_sample()}, soilKey checks for the file
in the user cache. If missing, the loader prompts (interactive
sessions only) to download. Use \code{download_extdata_cache()}
to eagerly populate the cache without prompting.
}
\examples{
\donttest{
# Network-dependent; the example no-ops on CRAN.
if (interactive()) {
  # Download every lazy-fetch cache once, ahead of any benchmark run:
  download_extdata_cache()

  # Or just the WRB AfSP sample:
  download_extdata_cache("afsp_sample")
}
}
}
