README: wording on why

This commit is contained in:
Domen Kožar 2019-12-19 17:54:19 +01:00
commit cdc802d712
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -15,14 +15,11 @@ Directory-based caching on a typical CI doesn't work well for Nix.
`/nix/store` is a global storage of everything Nix operates on. These are `/nix/store` is a global storage of everything Nix operates on. These are
your sources, patches, tarballs, packages, configuration. your sources, patches, tarballs, packages, configuration.
Caching `/nix/store` is time consuming as Nix only appends store paths to it. A directory-based cache requires that downloading a whole store, including the irrelevant parts. cachix-action will only fetch what's needed by configuring a Nix binary cache.
As you invoke new builds, those will contain all your sources throughout the whole history of your build.
Garbage collecting is also suboptimal, as caching is hard to invalidate correctly When the build is done, cachix-action only has to upload the new store paths, rather than syncing the whole store.
between different changes and branches.
Cachix avoids this by keeping your `/nix/store` hosted and only downloads the bits you Purging paths from a directory-based cache is not feasible because it'd have to be aware of all branches and their respective contents somehow.
need for the given build (in parallel) using Nix substituters.
## Usage ## Usage