Skip to main content

Module drv_cache

Module drv_cache 

Source
Expand description

Content-addressed derivation path cache (redb-backed). Content-addressed derivation path cache.

Maps (lock_hash, source_hash, attr_path) → (drvPath, outPath) using redb. Survives process restarts. Designed to avoid full nixpkgs evaluation when the result is already known for a given flake.lock + flake.nix + attribute.

The cache file lives at ~/.cache/sui/drv-cache.redb by default.

Structs§

DrvCache
redb-backed derivation path cache.
DrvCacheEntry
A cached derivation path entry.

Enums§

DrvCacheError
Errors from the derivation cache.

Functions§

init_global_cache
Initialize the global derivation cache (call once at startup).
with_cache
Access the global cache for a lookup.
with_cache_mut
Access the global cache for a write.