Mac OS X – Clearing or flushing the DNS Cache is regular occurrence for a network engineer.
Once you go to a Web site, or do any DNS lookup, the IP gets cached for quite a while. This becomes a royal pain if youíre a systems administrator who is in the middle of migrating domains from one server to another. Executing the following clears the cache, restarts the caching daemon, and fetches fresh DNS records.
And there was much rejoicing
For OS X Yosemite
sudo discoveryutil udnsflushcaches
For Mountain Lion / Lion
sudo killall -HUP mDNSResponder
sudo dscacheutil -flushcache
(On Windows you do
Reference: Apple Support Site here