Flush DNS Cache on OS X Lion and Mountain Lion

To flush the DNS cache on Mac OS X Lion and Mountain Lion, run the following in a terminal session:

sudo killall -HUP mDNSResponder