News for hackers. Stuff that matters.
Re:OS X DNS cache reset script by sirn on Tuesday June 14, 2016 @12:23PM (#11903100)
The command did flush the Directory Service cache, but DNS is no longer part of it. You can still use its query command though.

    dscacheutil -q host -a name www.example.com
On the topic, easiest way to see if dscacheutil -flushcache work or not is to probably do something like:

    dscacheutil -q host -a name www.example.com
    # Make sure it's in the cache prior to running.
    
    sudo dscacheutil -flushcache
    dscacheutil -q host -a name www.example.com
    # Notice if there's a slight delay for the lookup.
    
    sudo killall -HUP mDNSResponder
    dscacheutil -q host -a name www.example.com
    # Notice if there's a slight delay for the lookup.

There are no comments on this comment yet.