From eb55a5d7837fe073c1875238590b76256410a928 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Sun, 8 Oct 2023 01:59:14 -0400 Subject: [PATCH] iteration --- lns.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lns.lua b/lns.lua index 103fdd5..5dc5cbb 100644 --- a/lns.lua +++ b/lns.lua @@ -63,7 +63,6 @@ function lns_lookup(remote_hostname) end -load_cache() local action = args[1] if action == nil then @@ -72,6 +71,8 @@ if action == nil then end if action == "lookup" then + load_cache() + local hostname = args[2] if hostname == nil then io.write("Usage: lns lookup \n") @@ -92,5 +93,6 @@ if action == "lookup" then elseif action == "clear" then cache = {} + save_cache() print("Cleared cache!") end \ No newline at end of file