summaryrefslogtreecommitdiff
path: root/xmake/core/project/option.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-22 00:48:16 +0800
committerruki <[email protected]>2020-12-22 00:48:16 +0800
commit4782a9648e20c0e6a4620f7255ab3cb476dceb5e (patch)
treeb28369f767800262db24da6b347d62acf8ffad33 /xmake/core/project/option.lua
parent192f10c1d09e665f04dd5669fcaccc5abccbb9db (diff)
rewrite some caches
Diffstat (limited to 'xmake/core/project/option.lua')
-rw-r--r--xmake/core/project/option.lua16
1 files changed, 3 insertions, 13 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua
index fd343b8a6..4cee0d494 100644
--- a/xmake/core/project/option.lua
+++ b/xmake/core/project/option.lua
@@ -33,7 +33,7 @@ local global = require("base/global")
local scopeinfo = require("base/scopeinfo")
local interpreter = require("base/interpreter")
local config = require("project/config")
-local cache = require("project/cache")
+local localcache = require("cache/localcache")
local linker = require("tool/linker")
local compiler = require("tool/compiler")
local sandbox = require("sandbox/sandbox")
@@ -373,17 +373,7 @@ end
-- get cache
function option._cache()
-
- -- get it from cache first if exists
- if option._CACHE then
- return option._CACHE
- end
-
- -- init cache
- option._CACHE = cache("local.option")
-
- -- ok
- return option._CACHE
+ return localcache.cache("option")
end
-- get option apis
@@ -496,7 +486,7 @@ end
-- save all options to the cache file
function option.save()
- option._cache():flush()
+ option._cache():save()
end
-- return module