[Dnsmasq-discuss] Feature REQ: (yes, I know you've Just Said No)

Simon Kelley simon@thekelleys.org.uk
Mon, 06 Dec 2004 21:54:48 +0000

gypsy wrote:
> I come from djbdns / dnscache where there is a 3rd party patch for this,
> so I know its value.
> The biggest shortcoming I find in dnsmasq is that it will not dump and
> reload its cache.  Please add that ability as an option.  Those who turn
> off their computers (or whatever) may say No to a cache reload.  Those
> who just want to boot a new kernel or change dnsmasq.conf may say Yes ;)
> In my case, I have been tweaking dnsmasq.conf.  In order to reload it,
> one must stop and restart dnsmasq.  But the terrible side effect of that
> is that the cache is destroyed.  Having looked at cache.c, I conclude
> that it is perfectly capable of fixing any issue I might encounter from
> having reloaded a dirty cache.  No, please _don't_ implement a feature
> that reloads dnsmasq.conf rather than do a cache dump and reload...
> Since SIGHUP clears the cache, if there are problems with the reloaded
> cache it would be simple to destroy it and start over.
> So, One More Time from the peanut gallery:  PLEASE IMPLEMENT A CACHE
> gypsy

You countered lots of arguments against doing this that I don't care 
about, but you ignored the main reason I've never implemented it.

What's the advantage in reloading the cache from file on disk when you 
can just reload it from the upstream nameservers?  All the information 
is there and you don't have to pay the cost to store it yourself 
(insignificant) or to keep code around to dump and restore it (which 
might not be insignificant, especially on a Linksys plastic router box 
and other embedded platform.)

I've never tried to measure it, but subjectively I can't feel any 
significant performace loss after emptying the cache.