Skip to main content

cache_path_with_root

Function cache_path_with_root 

pub fn cache_path_with_root(
    key: &[u8; 32],
    repo_path: &Path,
    root: &Path,
) -> PathBuf
Expand description

Same as cache_path but with an explicit root (for --cache-dir override).

repo_path is canonicalised before hashing the per-repo subdirectory name so this function and cache_key (which already canonicalises) stay in lockstep. Without this, calling codelore analyze . and codelore analyze $(pwd) produced identical cache keys but different cache subdirectories — neither call could see the other’s cache file, forcing a redundant ingest every time the user alternated invocation styles.