nix icon indicating copy to clipboard operation
nix copied to clipboard

Replace fetchToStore cache by sourcePathToHash cache

Open edolstra opened this issue 1 month ago • 0 comments

Motivation

Caching NAR hashes instead of store paths makes the cache more general, because we can always compute the store path from the NAR hash, but not the other way around. This is useful for lazy trees, where we want to compute the NAR hash of an input with caching.

This PR also cherry-picks https://github.com/DeterminateSystems/nix-src/pull/157, which adds a Store::maybeQueryPathInfo() method. This is preferred over isValidPath() because it has better caching.

Context


Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

edolstra avatar Dec 10 '25 20:12 edolstra