After a bit of beating my head against the wall yesterday, trying to flush out the local resolver cache, I finally learned it has changed a bit under Lion.
In 10.6, and prior, the method was to issue
dscachutil -flushcache
from a Terminal prompt.
This no longer works, as I learned trying to flush an Address record I knew had changed (because I changed it myself on one of my domains). The new record had propagated on the Internet, and dig was getting the proper response from various external servers. But anything using the local resolver cache kept getting the old IP address, even after "flushing" with the old command.
I tracked it down by doing a dump of the local cache into system.log
sudo killall -INFO mDNSResponder
before and after using the old flush command. The old record remained in the cache, along with lots of others.
I dragged out my 10.6.8 external disk and booted from it. When you issue the old command (dscacheutil -flushcache) under 10.6, the following line is logged to system.log:
Oct 16 10:37:54 helios mDNSResponder[12]: SIGHUP: Purge cache
and of course the cache is flushed.
Using the old command under 10.7, there is no "Purge cache" being logged, and the cache remains intact.
What works under 10.7 is:
sudo killall -HUP mDNSResponder
That logs the purge, and flushes the cache.
In 10.6, and prior, the method was to issue
dscachutil -flushcache
from a Terminal prompt.
This no longer works, as I learned trying to flush an Address record I knew had changed (because I changed it myself on one of my domains). The new record had propagated on the Internet, and dig was getting the proper response from various external servers. But anything using the local resolver cache kept getting the old IP address, even after "flushing" with the old command.
I tracked it down by doing a dump of the local cache into system.log
sudo killall -INFO mDNSResponder
before and after using the old flush command. The old record remained in the cache, along with lots of others.
I dragged out my 10.6.8 external disk and booted from it. When you issue the old command (dscacheutil -flushcache) under 10.6, the following line is logged to system.log:
Oct 16 10:37:54 helios mDNSResponder[12]: SIGHUP: Purge cache
and of course the cache is flushed.
Using the old command under 10.7, there is no "Purge cache" being logged, and the cache remains intact.
What works under 10.7 is:
sudo killall -HUP mDNSResponder
That logs the purge, and flushes the cache.