feat(cache): allow to disable the cache

This commit is contained in:
Folke Lemaitre 2023-02-13 11:58:09 +01:00
parent 609445a051
commit 856ab9e476
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 6 additions and 3 deletions

View File

@ -113,8 +113,9 @@ M.defaults = {
notify = true, -- get a notification when changes are found notify = true, -- get a notification when changes are found
}, },
performance = { performance = {
---@type LazyCacheConfig cache = {
cache = nil, enabled = true,
},
reset_packpath = true, -- reset the package path to improve startup time reset_packpath = true, -- reset the package path to improve startup time
rtp = { rtp = {
reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory

View File

@ -34,7 +34,9 @@ function M.setup(spec, opts)
local start = vim.loop.hrtime() local start = vim.loop.hrtime()
-- load module cache before anything else -- load module cache before anything else
require("lazy.core.cache").enable() if not (opts and opts.performance and opts.performance.cache and opts.performance.cache.enabled == false) then
require("lazy.core.cache").enable()
end
require("lazy.stats").track("LazyStart") require("lazy.stats").track("LazyStart")