From 55137120df7595d75a7a7a08d70a4d1549820e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 13 Oct 2022 17:22:44 +0800 Subject: test clear node cache #1626 --- script/provider/provider.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script/provider') diff --git a/script/provider/provider.lua b/script/provider/provider.lua index c93a7c53..517ef54e 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -1072,6 +1072,7 @@ m.register '$/status/click' { local result = client.awaitRequestMessage('Info', lang.script.WINDOW_LUA_STATUS_DIAGNOSIS_MSG, { titleDiagnostic, DEVELOP and 'Restart Server', + DEVELOP and 'Clear Node Cache', }) if not result then return @@ -1085,6 +1086,11 @@ m.register '$/status/click' { local diag = require 'provider.diagnostic' diag.clearAll(true) os.exit(0, true) + elseif result == 'Clear Node Cache' then + local vm = require 'vm' + vm.clearNodeCache() + collectgarbage() + collectgarbage() end end } -- cgit v1.2.3