Skip to main content

resolve_cache_dir

Function resolve_cache_dir 

Source
pub fn resolve_cache_dir(
    root: &Path,
    model_repo: &str,
    override_dir: Option<&Path>,
) -> PathBuf
Expand description

Resolve the cache directory for a project + model combination.

Layout: <base>/<project_hash>/v<VERSION>-<model_slug>/

Encoding the version and model into the directory name means switching models creates a new cache dir (no migration needed) and bumping MANIFEST_VERSION auto-invalidates old caches (they’re just orphaned directories).

Priority: override > RIPVEC_CACHE env > XDG cache dir.