Flushing the local DNS cache is a common operation, especially if you have to deal with servers IP changes or if you need to tweak your /etc/hosts file (that also seems to get cached on OSX).
As finding the command in order to do so isn’t straightforward, here’s the magic command:
dscacheutil -flushcache