Skip to main content

install_compilation_cache

Function install_compilation_cache 

Source
pub fn install_compilation_cache() -> Result<Option<PathBuf>, CacheError>
Expand description

Installs the cache at default_cache_dir, or the directory COMPILATION_CACHE_ENV names, unless that variable turns caching off.

Returns Ok(None) only when the variable disables caching.

A directory that cannot be created is reported through tracing logs and then ignored, because denoising works without a cache. A caller that wants a creation failure reported should use install_compilation_cache_at.