style: cache debug

This commit is contained in:
Folke Lemaitre 2022-11-29 14:26:07 +01:00
parent ceeeda36e8
commit 0f5ceb9012
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,14 @@ function M.get(key)
end end
end end
function M.debug()
local ret = {}
for key, value in pairs(cache) do
ret[key] = #value
end
return ret
end
function M.set(key, value) function M.set(key, value)
cache[key] = value cache[key] = value
used[key] = true used[key] = true