lix/src/libstore
Eelco Dolstra ca580bec35 BinaryCacheStore: Support local caching of NARs
This speeds up commands like "nix cat-store". For example:

  $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf
  real    0m4.336s

  $ time nix cat-store --store https://cache.nixos.org?local-nar-cache=/tmp/nar-cache /nix/store/i60yncmq6w9dyv37zd2k454g0fkl3arl-systemd-234/etc/udev/udev.conf
  real    0m0.045s

The primary motivation is to allow hydra-server to serve files from S3
binary caches. Previously Hydra had a hack to do "nix-store -r
<path>", but that fetches the entire closure so is prohibitively
expensive.

There is no garbage collection of the NAR cache yet. Also, the entire
NAR is read when accessing a single member file. We could generate the
NAR listing to provide random access.

Note: the NAR cache is indexed by the store path hash, not the content
hash, so NAR caches should not be shared between binary caches, unless
you're sure that all your builds are binary-reproducible.
2017-10-17 21:15:33 +02:00
..
binary-cache-store.cc BinaryCacheStore: Support local caching of NARs 2017-10-17 21:15:33 +02:00
binary-cache-store.hh BinaryCacheStore: Support local caching of NARs 2017-10-17 21:15:33 +02:00
build.cc Add option to disable the seccomp filter 2017-10-12 18:21:55 +02:00
builtins.cc Don't remove Content-Encoding in fetchurl / nix-prefetch-url 2017-09-18 11:07:28 +02:00
builtins.hh Support netrc in <nix/fetchurl.nix> 2017-02-16 15:51:50 +01:00
crypto.cc Convert Settings to the new config system 2017-04-13 20:53:23 +02:00
crypto.hh Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
derivations.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
derivations.hh Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
download.cc Reverse retry logic to retry in all but a few cases 2017-10-02 23:22:02 -04:00
download.hh Don't remove Content-Encoding in fetchurl / nix-prefetch-url 2017-09-18 11:07:28 +02:00
export-import.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
fs-accessor.hh Add NAR / Store accessor abstraction 2016-02-25 17:43:19 +01:00
gc.cc Show the pid of temporary roots 2017-09-14 15:02:52 +02:00
globals.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
globals.hh Add option to disable the seccomp filter 2017-10-12 18:21:55 +02:00
http-binary-cache-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
legacy-ssh-store.cc LegacySSHStore: Include signatures etc. 2017-09-08 16:55:27 +02:00
local-binary-cache-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
local-fs-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
local-store.cc Add automatic garbage collection 2017-09-05 20:43:42 +02:00
local-store.hh Show the pid of temporary roots 2017-09-14 15:02:52 +02:00
local.mk Always use the Darwin sandbox 2017-06-06 18:44:49 +02:00
machines.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
machines.hh Replace $NIX_REMOTE_SYSTEMS with an option "builder-files" 2017-05-02 15:46:09 +02:00
misc.cc Call queryMissing() prior to building 2017-08-31 16:05:07 +02:00
nar-accessor.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nar-accessor.hh Add NAR / Store accessor abstraction 2016-02-25 17:43:19 +01:00
nar-info-disk-cache.cc Support base-64 hashes 2017-07-04 15:07:41 +02:00
nar-info-disk-cache.hh HttpBinaryCacheStore: Fix caching of WantMassQuery 2016-06-01 16:24:17 +02:00
nar-info.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nar-info.hh Make the store directory a member variable of Store 2016-06-01 16:24:17 +02:00
nix-store.pc.in Install some pkgconfig files 2014-09-18 12:00:40 +02:00
optimise-store.cc Give activities a verbosity level again 2017-08-28 19:13:24 +02:00
pathlocks.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
pathlocks.hh openLockFile: Return an AutoCloseFD 2017-01-26 20:40:33 +01:00
profiles.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
profiles.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
references.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
references.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
remote-fs-accessor.cc BinaryCacheStore: Support local caching of NARs 2017-10-17 21:15:33 +02:00
remote-fs-accessor.hh BinaryCacheStore: Support local caching of NARs 2017-10-17 21:15:33 +02:00
remote-store.cc RemoteStore: Add option to drop old connections from the pool 2017-09-14 18:10:38 +02:00
remote-store.hh RemoteStore: Add option to drop old connections from the pool 2017-09-14 18:10:38 +02:00
s3-binary-cache-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
s3-binary-cache-store.hh Fix getS3Stats() 2016-10-06 17:00:52 +02:00
s3.hh Add aws-region param to S3 store URLs 2017-03-03 16:12:17 -05:00
sandbox-defaults.sb Always use the Darwin sandbox 2017-06-06 18:44:49 +02:00
sandbox-minimal.sb Always use the Darwin sandbox 2017-06-06 18:44:49 +02:00
sandbox-network.sb OS X sandbox: Improve builtin sandbox profile 2017-05-31 17:25:51 +02:00
schema.sql Mark content-addressed paths in the Nix database and in .narinfo 2016-08-10 18:05:35 +02:00
serve-protocol.hh LegacySSHStore: Include signatures etc. 2017-09-08 16:55:27 +02:00
sqlite.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
sqlite.hh Improve SQLite busy handling 2017-02-28 13:59:11 +01:00
ssh-store.cc Add a Config class to simplify adding configuration settings 2017-04-13 16:03:31 +02:00
ssh.cc Disallow SSH host names starting with a dash 2017-08-16 20:55:58 +02:00
ssh.hh Disallow SSH host names starting with a dash 2017-08-16 20:55:58 +02:00
store-api.cc copyStorePath(): Fill in missing narHash regardless of checkSigs 2017-09-08 14:48:08 +02:00
store-api.hh Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
worker-protocol.hh Don't send progress messages to older clients 2017-08-28 18:54:23 +02:00