Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Nix Cache Info Format

The nix-cache-info file is a metadata file at the root of a binary cache (e.g., https://cache.example.com/nix-cache-info).

MIME type: text/x-nix-cache-info

Format

Line-based key-value format:

Key: value

Leading and trailing whitespace is trimmed from values. Lines without a colon are ignored. Unknown keys are silently ignored.

Fields

StoreDir

The Nix store directory path that this cache was built for (e.g., /nix/store).

If present, Nix verifies that this matches the client's store directory:

error: binary cache 'https://example.com' is for Nix stores with prefix '/nix/store', not '/home/user/nix/store'

WantMassQuery

1 or 0. Sets the default for want-mass-query.

Priority

Integer. Sets the default for priority.

Example

StoreDir: /nix/store
WantMassQuery: 1
Priority: 30

Caching Behavior

Nix caches nix-cache-info in the cache directory with a 7-day TTL.

See Also