For Mac OS X Yosemite and later “sudo killall -HUP mDNSResponder”
Earlier versions of MacOS
per Mac OS X Yosemite da v10.10 a v10.10.3 “sudo discoveryutil mdnsflushcache”
per Mac OS X Mavericks, Mountain Lion e Lion “sudo killall -HUP mDNSResponder”
per Mac OS X Snow Leopard “sudo dscacheutil -flushcache”.