Skip to content

Commit

Permalink
perf: new file-based cache that ensures correct rtp order (#532)
Browse files Browse the repository at this point in the history
* perf: new file-based cache that ensures rtp is alweays correct and will cache all files, including those after startup

* refactor: new cache

* test: fix tests

* fix(cache): cache file names on Windows

* feat(cache): allow to disable the cache

* docs: updated cache settings
  • Loading branch information
folke committed Feb 13, 2023
1 parent 06f835d commit 462633b
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 517 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ return {
init = "",
import = "",
keys = "",
lazy = " ",
lazy = "󰒲 ",
loaded = "",
not_loaded = "",
plugin = "",
Expand Down Expand Up @@ -409,14 +409,6 @@ return {
performance = {
cache = {
enabled = true,
path = vim.fn.stdpath("cache") .. "/lazy/cache",
-- Once one of the following events triggers, caching will be disabled.
-- To cache all modules, set this to `{}`, but that is not recommended.
-- The default is to disable on:
-- * VimEnter: not useful to cache anything else beyond startup
-- * BufReadPre: this will be triggered early when opening a file from the command line directly
disable_events = { "UIEnter", "BufReadPre" },
ttl = 3600 * 24 * 5, -- keep unused modules for up to 5 days
},
reset_packpath = true, -- reset the package path to improve startup time
rtp = {
Expand Down
Loading

0 comments on commit 462633b

Please sign in to comment.