summaryrefslogtreecommitdiff
path: root/xmake/core/project/cache.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-30 23:51:59 +0800
committerruki <[email protected]>2026-03-30 23:51:59 +0800
commit701d59c83a64bf5aa73f2bc386a0cdba087349c4 (patch)
tree85de317c9904b4aa9e818cbef5615ed2cfad28be /xmake/core/project/cache.lua
parente23dc968df5fa84e24e98a7fff903e40a12d6624 (diff)
update more comments
Diffstat (limited to 'xmake/core/project/cache.lua')
-rw-r--r--xmake/core/project/cache.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/xmake/core/project/cache.lua b/xmake/core/project/cache.lua
index 280df52e8..669ec1a03 100644
--- a/xmake/core/project/cache.lua
+++ b/xmake/core/project/cache.lua
@@ -86,22 +86,30 @@ function cache._instance(scopename)
return instance
end
--- get the value
+-- get the cached value
+--
+-- @param name the cache key
+-- @return the cached value
+--
function cache:get(name)
return self._CACHEDATA[name]
end
--- set the value
+-- set the cached value
+--
+-- @param name the cache key
+-- @param value the value to cache
+--
function cache:set(name, value)
self._CACHEDATA[name] = value
end
--- clear all
+-- clear all cached values
function cache:clear()
self._CACHEDATA = {__version = xmake._VERSION_SHORT}
end
--- flush to cache file
+-- flush cached values to file
function cache:flush()
-- flush the version