nixos/nscd: set positive hosts caching ttl to 0

This effectively disables nscd's built-in hosts cache, which turns out
to be erratic in some cases.

We only use nscd these days as a more ABI-neutral NSS dispatcher
mechanism.

Local caching should still be possible with local resolvers in
/etc/resolv.conf (via the `dns` NSS module), or without local resolvers
via systemd-networkd (via the `resolve` nss module)

We don't set enable-cache to no due to
https://github.com/NixOS/nixpkgs/pull/50316#discussion_r241035226.
This commit is contained in:
Florian Klink 2020-06-01 01:12:43 +02:00
parent 5e898d1cb8
commit 09244cbd98

View File

@ -24,7 +24,7 @@ negative-time-to-live netgroup 0
shared netgroup yes
enable-cache hosts yes
positive-time-to-live hosts 600
positive-time-to-live hosts 0
negative-time-to-live hosts 0
shared hosts yes