Back to Nix

Binary Cache

doc/manual/source/protocols/binary-cache/index.md

2.35.11.3 KB
Original Source

Binary Cache

The binary cache format is an interface designed for exposing a store over HTTP.

A binary cache consists of:

  • A nix-cache-info file at the root with remote-side configuration.
  • For each store object:
    • A .narinfo file containing the object's metadata and a (usually relative) URL to the corresponding compressed NAR.
    • A possibly-compressed Nix Archive containing the store object's file system data.
  • For every entry in the build trace, a JSON file at build-trace-v2/<drvBaseName>/<outputName>.doi:
    • the path encodes the key
    • the contents are the value.

The following store types use the binary cache format: