diff options
| author | Redbeanw44602 <[email protected]> | 2025-10-27 22:41:23 +0800 |
|---|---|---|
| committer | Redbeanw44602 <[email protected]> | 2025-10-27 22:41:23 +0800 |
| commit | 29338f95e1e7fe27b78089d58e4e9af680ea85c6 (patch) | |
| tree | 132e5d7907ac9e4de8867e2c69fbd364c992acc6 | |
| parent | b81abbf39dcc81ed76fe62939bd0e4311a152d7b (diff) | |
Revert "add opt.nocache to find_programver."
This reverts commit 4dade56c47f64fbf089b1b4299ae284b4e2dd5eb.
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_programver.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua index dc260e5cc..0d76526e5 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_programver.lua @@ -67,7 +67,7 @@ function sandbox_lib_detect_find_programver.main(program, opt) scheduler.co_lock(lockname) -- attempt to get result from cache first - local result = opt.nocache and nil or detectcache:get2(cachekey, program) + local result = detectcache:get2(cachekey, program) if result ~= nil and not opt.force then scheduler.co_unlock(lockname) return result and result or nil @@ -108,9 +108,7 @@ function sandbox_lib_detect_find_programver.main(program, opt) end -- save result - if not opt.nocache then - detectcache:set2(cachekey, program, result and result or false) - end + detectcache:set2(cachekey, program, result and result or false) scheduler.co_unlock(lockname) return result end |
