Flushing DNS cache on macOS

Here's the best way to flush DNS cache on macOS:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say cache flushed

Notice that last part — that's why this is the best method. You get an audible "cache flushed" almost instantaneously, and the whole process becomes that much more satisfying.

Another fun variation:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say booyah!

Have at it. It may be silly, but it's the little things in life. Now, go flush that DNS!