This command will flush the DNS cache in Mac OS X 10.10 (Yosemite)

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed