Global package cache.
Downloaded packages are stored in ~/.npm_ex/cache/<name>/<version>/
and reused across projects. The cache is populated on first install
and checked before downloading from the registry.
Summary
Functions
Check if a package version is already cached.
Root directory of the global cache.
Ensure a package version is in the cache.
Path to a specific package version in the cache.
Functions
Check if a package version is already cached.
@spec dir() :: String.t()
Root directory of the global cache.
@spec ensure(String.t(), String.t(), String.t(), String.t(), keyword()) :: {:ok, String.t()} | {:ok, :missing_optional} | {:error, term()}
Ensure a package version is in the cache.
Downloads and extracts the tarball if not already cached.
Returns {:ok, cache_path}, {:ok, :missing_optional} when an
optional package fails to fetch, or {:error, reason}.
Path to a specific package version in the cache.