Migrate alertable disabled alerts preference to lua

This avoids performing multiple hget on redis, thus increasing performance
This commit is contained in:
emanuele-f 2019-11-05 14:59:38 +01:00
parent a96a90b65f
commit 54140b6f1a
14 changed files with 116 additions and 133 deletions

View file

@ -3385,6 +3385,17 @@ end
-- ###########################################
-- @brief Deletes all the cache/prefs keys matching the pattern
function deleteCachePattern(pattern)
local keys = ntop.getKeysCache(pattern)
for key in pairs(keys or {}) do
ntop.delCache(key)
end
end
-- ###########################################
--
-- IMPORTANT
-- Leave it at the end so it can use the functions