perf: when reloading plugin specs always use cache

This commit is contained in:
Folke Lemaitre 2022-12-16 15:08:09 +01:00
parent e897524b1f
commit 060cf23aca
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 6 additions and 1 deletions

View file

@ -92,6 +92,10 @@ function M.loader(modname)
return chunk or error(err)
end
function M.require(modname)
return M.loader(modname)()
end
function M.idx()
-- update our loader position if needed
if package.loaders[M.loader_idx] ~= M.loader then