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