Skip to main content

resolve_cache_dir

Function resolve_cache_dir 

Source
pub fn resolve_cache_dir(override_dir: Option<PathBuf>) -> Option<PathBuf>
Expand description

Resolve cache root: override, env, DOCSRS_CLI_HOME/cache, then XDG cache home.

Precedence:

  1. Explicit override (--cache-dir / caller)
  2. DOCSRS_CLI_CACHE_DIR
  3. {DOCSRS_CLI_HOME}/cache when DOCSRS_CLI_HOME is set
  4. directories::ProjectDirs cache dir