Commit b706d8c7 authored by Jan Pavlinec's avatar Jan Pavlinec

knot-resolver: add option keep_cache

Note: Clearing cache after every restart is no longer needed.
parent 0c83687a
......@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=knot-resolver
PKG_VERSION:=1.5.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-resolver
......
......@@ -77,7 +77,7 @@ include_custom_config() {
}
load_uci_config_common() {
local interface keyfile verbose port msg_buffer_size net_ipv4 net_ipv6 msg_cache_size do_forward ignore_root_key
local interface keyfile verbose port msg_buffer_size net_ipv4 net_ipv6 msg_cache_size do_forward ignore_root_key keep_cache_bool
local section="common"
# port
......@@ -121,7 +121,12 @@ load_uci_config_common() {
config_get msg_cache_size "$section" msg_cache_size
conv_msg_cache_size=$(echo "$msg_cache_size"|sed -e 's/k$/*kB/gi' -e 's/M$/*MB/gi' -e 's/G$/*GB/gi')
set_param_func "cache.open" "$conv_msg_cache_size"
set_param_func "cache.clear" ""
# clear cache
config_get_bool keep_cache_bool "kresd" keep_cache 1
if [ "$keep_cache_bool" = "0" ]; then
set_param_func "cache.clear" ""
fi
config_get_bool do_forward "$section" forward_upstream 1
if [ "$do_forward" = "1" ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment