Windows
ipconfig /flushdns
MacOS
MacOS >= 10.10.4
sudo killall -HUP mDNSResponder
MacOS 10.10.1, 10.10.2, and 10.10.3
sudo discoveryutil mdnsflushcache
MacOS 10.7, 10.8, and 10.9
sudo killall -HUP mDNSResponder
MacOS 10.5 and 10.6
sudo dscacheutil -flushcache