OS X 10.10 Yosemite
For OS X 10.10 Yosemite v10.10.4 or higher, Apple uses the mDNSResponder for resolving DNS queries. For version 10.10.3 and below, discoveryd is used. Correspondingly there are differences:
10.10.4
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
10.10.0-3
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches