File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ return {
384
384
-- * VimEnter: not useful to cache anything else beyond startup
385
385
-- * BufReadPre: this will be triggered early when opening a file from the command line directly
386
386
disable_events = { " VimEnter" , " BufReadPre" },
387
+ ttl = 3600 * 24 * 5 , -- keep unused modules for up to 5 days
387
388
},
388
389
reset_packpath = true , -- reset the package path to improve startup time
389
390
rtp = {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ M.config = {
16
16
-- * VimEnter: not useful to cache anything else beyond startup
17
17
-- * BufReadPre: this will be triggered early when opening a file from the command line directly
18
18
disable_events = { " VimEnter" , " BufReadPre" },
19
+ ttl = 3600 * 24 * 5 , -- keep unused modules for up to 5 days
19
20
}
20
21
M .debug = false
21
22
@@ -27,7 +28,6 @@ local cache_hash
27
28
--- @type table<string,CacheEntry ? >
28
29
M .cache = {}
29
30
M .enabled = true
30
- M .ttl = 3600 * 24 * 5 -- keep unused modules for up to 5 days
31
31
--- @type string[]
32
32
M .rtp = nil
33
33
-- selene:allow(global_usage)
@@ -238,7 +238,7 @@ function M.save_cache()
238
238
uv .fs_write (f , M .VERSION )
239
239
uv .fs_write (f , " \0 " )
240
240
for modname , entry in pairs (M .cache ) do
241
- if entry .used > os.time () - M .ttl then
241
+ if entry .used > os.time () - M .config . ttl then
242
242
entry .modname = modname
243
243
local header = {
244
244
entry .hash .size ,
You can’t perform that action at this time.
0 commit comments