kresd.init: keep kresd dns cache after restart (via config option)
today in /etc/init.d/kresd is hardcoded ...
[...]
set_param_func "cache.clear" ""
[...]
... so every restart resets the dns cache as well. This is quite annoying with adblock in place, where every blocklist refresh leads into a kresd restart / cache reset ...
Proposal: add this small piece of code to /etc/init.d/kresd and make it configurable via "msg_keep_cache". The variable defaults to "0" (clear cache), however now it's possible to control/change the cache behaviour.
# msg_keep_cache
config_get msg_keep_cache "$section" msg_keep_cache 0
[ "$msg_keep_cache" -eq 0 ] && set_param_func "cache.clear" ""
[...]
Thanks! Dirk Brenken