Clear dnsmasq cache when necessary