sammcd / Business-Time

Business Time is a Mac OS X application to help focus and block time wasting web sites.
http://sammcd.com
1 stars 0 forks source link

Flush DNS Cache #2

Open soffes opened 14 years ago

soffes commented 14 years ago

Everything we update the hosts file, we should run the following to clear the local DNS cache.

dscacheutil -flushcache
sammcd commented 14 years ago

DNS Cache is being flushed. It is done in BTBlackListModel.m in enableFilters and disableFilters methods.

The problems seems to be when flushchache runs during a web requests, that request's record will not be flushed. If we flush the cache twice in a row the bug appears less often, but I took that out when I sent this as sample code to BNR.

For now as a user... Try not to enable or disable the filters during a lot of web requests.