diff options
| author | ruki <[email protected]> | 2020-12-22 00:59:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-22 00:59:41 +0800 |
| commit | fd125f21ece875cd6a5037725f2d84f24e658f41 (patch) | |
| tree | 590e39b3b4bdb4f3853b0a965c6367b0ed646b12 /xmake/modules/net/ping.lua | |
| parent | f3897d3c4f307335806c64060e679324f0931adc (diff) | |
improve some detectcache
Diffstat (limited to 'xmake/modules/net/ping.lua')
| -rw-r--r-- | xmake/modules/net/ping.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/net/ping.lua b/xmake/modules/net/ping.lua index a783866fc..1f361a5d6 100644 --- a/xmake/modules/net/ping.lua +++ b/xmake/modules/net/ping.lua @@ -19,7 +19,7 @@ -- -- imports -import("lib.detect.cache") +import("core.cache.detectcache") import("detect.tools.find_ping") import("detect.tools.find_nmap") import("private.async.runjobs") @@ -45,7 +45,7 @@ function main(hosts, opt) -- do not force ping? enable cache local cacheinfo = nil if not opt.force then - cacheinfo = cache.load("net.ping") + cacheinfo = detectcache:get("net.ping") end -- run tasks @@ -111,7 +111,8 @@ function main(hosts, opt) -- save cache if cacheinfo then - cache.save("net.ping", cacheinfo) + detectcache:set("net.ping", cacheinfo) + detectcache:save() end -- ok? |
