1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 15:48:00 +02:00

Make the TTL for disk cache configurable, we can now completely disable

disk cache lookup for example by doing:
  nix copy --from <binary-cahe> <store-path> --option \
  positive-disk-cache-ttl 0

Issues: #1885 #2035
This commit is contained in:
AmineChikhaoui 2018-04-02 12:45:18 +01:00
parent 27e9ce0eb2
commit 2855c3d965
No known key found for this signature in database
GPG key ID: C0C8C84C15BCCD1C
2 changed files with 11 additions and 8 deletions

View file

@ -310,6 +310,12 @@ public:
"Disabled substituters that may be enabled via the substituters option by untrusted users.",
{"trusted-binary-caches"}};
Setting<int> ttlNegativeDiskCache{this, 3600, "negative-disk-cache-ttl",
"The TTL in seconds for negative lookups in the disk cache."};
Setting<int> ttlPositiveDiskCache{this, 30 * 24 * 3600, "positive-disk-cache-ttl",
"The TTL in seconds for positive lookups in the disk cache."};
Setting<Strings> trustedUsers{this, {"root"}, "trusted-users",
"Which users or groups are trusted to ask the daemon to do unsafe things."};