name service cache daemon (nscd
) cache is persistent by default on CentOS 7, to flush it, you need to run:
nscd -i hosts
-i
stands for invalidate.
You can also check if nscd
‘s cache is persistent by running
nscd -g
nscd
caches several other types of data (not just DNS entries), so if you’re looking for the DNS cache specifically, make sure to look under the hosts cache
section: