I am trying to flush my cache with:
sudo discoveryutil mdnsflushcache
sudo discoveryutil udnsflushcache
And then immediately run a curl requesting a file from the web. I've had to add a sleep statement after the cache flushes in order for curl to pickup (request) the correct DNS information.
Is that correct? Or is something else going on here?
MacBook Pro with Retina display, OS X Yosemite (10.10.2)