ReleaseKit. PackageCache
(ReleaseKit v0.3.1)
Copy Markdown
Tracks package inputs so unchanged release directories can reuse artifacts.
The cache stores per-file metadata beside the manifest. A hit is valid only when the tarball, checksum sidecar, manifest, and cache file all exist and the current fingerprint matches the cached fingerprint.
Like Mix compilers, the cache uses file size and mtime as the fast path and only hashes file contents when metadata changed or a file is new.
Summary
Functions
Fingerprints a release directory plus package contexts.
Returns true when an existing package can be reused for the fingerprint.
Returns the cache file path associated with a manifest path.
Records the package bytes associated with a cache entry.
Returns a reusable package source for unchanged release content.
Writes a package cache entry.
Types
@type t() :: %ReleaseKit.PackageCache{ checksum: String.t() | nil, content_fingerprint: binary(), entries: [ReleaseKit.PackageCache.Entry.t()], fingerprint: binary(), tarball: Path.t() | nil, version: pos_integer() }
Functions
Fingerprints a release directory plus package contexts.
Returns true when an existing package can be reused for the fingerprint.
Returns the cache file path associated with a manifest path.
Records the package bytes associated with a cache entry.
Returns a reusable package source for unchanged release content.
Writes a package cache entry.