From c93428b82f400dbab53de93fb3f2141136f91ac0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Mon, 27 Apr 2020 08:12:10 +0200 Subject: [PATCH] docker: always clear cache in debug mode --- etc/config/config.docker | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/config/config.docker b/etc/config/config.docker index 8e58fbd66..7bec09881 100644 --- a/etc/config/config.docker +++ b/etc/config/config.docker @@ -3,6 +3,9 @@ -- Refer to manual: https://knot-resolver.readthedocs.io/en/stable/ print('Knot Resolver ' .. package_version()) +-- Smaller cache size +cache.size = 10 * MB + function interactive_mode() -- Listen on all interfaces (localhost would not work in Docker) net.listen('0.0.0.0', 53, { kind = 'dns' }) @@ -16,9 +19,6 @@ function interactive_mode() 'http', } - -- Smaller cache size - cache.size = 10 * MB - function print_help() print('\nUsage\n' .. '=====\n' @@ -52,6 +52,9 @@ function debug_mode(qname, qtype) modules.unload('ta_signal_query') modules.unload('ta_update') + -- always empty cache so this config works reliably outside Docker + cache.clear() + -- execute query right after start up and exit when the query is finished event.after(0, function() -- ultra verbose log -- 2.47.2