diff options
| author | ruki <[email protected]> | 2020-12-19 20:41:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-19 20:41:24 +0800 |
| commit | 22dca65a708eb7bb98ca2263665da56eecc48715 (patch) | |
| tree | b374d4c84d9ec8524d2661053e111b7303d4e9c3 | |
| parent | 764ccc35c4196d11590b7e76f500448277304b5e (diff) | |
add new stub cache modules
| -rw-r--r-- | xmake/core/cache/globalcache.lua | 33 | ||||
| -rw-r--r-- | xmake/core/cache/localcache.lua (renamed from xmake/core/base/cache.lua) | 10 | ||||
| -rw-r--r-- | xmake/core/cache/memcache.lua | 35 |
3 files changed, 73 insertions, 5 deletions
diff --git a/xmake/core/cache/globalcache.lua b/xmake/core/cache/globalcache.lua new file mode 100644 index 000000000..c0e938726 --- /dev/null +++ b/xmake/core/cache/globalcache.lua @@ -0,0 +1,33 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file globalcache.lua +-- + +-- define module: globalcache +local globalcache = globalcache or {} + +-- load modules +local io = require("base/io") +local os = require("base/os") +local path = require("base/path") +local table = require("base/table") +local utils = require("base/utils") +local global = require("base/global") + +-- return module: globalcache +return globalcache diff --git a/xmake/core/base/cache.lua b/xmake/core/cache/localcache.lua index d28300602..647d74aa8 100644 --- a/xmake/core/base/cache.lua +++ b/xmake/core/cache/localcache.lua @@ -15,11 +15,11 @@ -- Copyright (C) 2015-present, TBOOX Open Source Group. -- -- @author ruki --- @file cache.lua +-- @file localcache.lua -- --- define module: cache -local cache = cache or {} +-- define module: localcache +local localcache = localcache or {} -- load modules local io = require("base/io") @@ -29,5 +29,5 @@ local table = require("base/table") local utils = require("base/utils") local global = require("base/global") --- return module: cache -return cache +-- return module: localcache +return localcache diff --git a/xmake/core/cache/memcache.lua b/xmake/core/cache/memcache.lua new file mode 100644 index 000000000..693c5b52d --- /dev/null +++ b/xmake/core/cache/memcache.lua @@ -0,0 +1,35 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file memcache.lua +-- + +-- define module: memcache +local memcache = memcache or {} + +-- load modules +local table = require("base/table") + +-- new an instance +function _instance.new(name) + local instance = table.inherit(_instance) + return instance +end + + +-- return module: memcache +return memcache |
