diff options
| author | ruki <[email protected]> | 2020-12-22 00:48:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-22 00:48:16 +0800 |
| commit | 4782a9648e20c0e6a4620f7255ab3cb476dceb5e (patch) | |
| tree | b28369f767800262db24da6b347d62acf8ffad33 /xmake/core/project/option.lua | |
| parent | 192f10c1d09e665f04dd5669fcaccc5abccbb9db (diff) | |
rewrite some caches
Diffstat (limited to 'xmake/core/project/option.lua')
| -rw-r--r-- | xmake/core/project/option.lua | 16 |
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 |
