From 22dca65a708eb7bb98ca2263665da56eecc48715 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 19 Dec 2020 20:41:24 +0800 Subject: add new stub cache modules --- xmake/core/base/cache.lua | 33 --------------------------------- xmake/core/cache/globalcache.lua | 33 +++++++++++++++++++++++++++++++++ xmake/core/cache/localcache.lua | 33 +++++++++++++++++++++++++++++++++ xmake/core/cache/memcache.lua | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 33 deletions(-) delete mode 100644 xmake/core/base/cache.lua create mode 100644 xmake/core/cache/globalcache.lua create mode 100644 xmake/core/cache/localcache.lua create mode 100644 xmake/core/cache/memcache.lua diff --git a/xmake/core/base/cache.lua b/xmake/core/base/cache.lua deleted file mode 100644 index d28300602..000000000 --- a/xmake/core/base/cache.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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 cache.lua --- - --- define module: cache -local cache = cache 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: cache -return cache 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/cache/localcache.lua b/xmake/core/cache/localcache.lua new file mode 100644 index 000000000..647d74aa8 --- /dev/null +++ b/xmake/core/cache/localcache.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 localcache.lua +-- + +-- define module: localcache +local localcache = localcache 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: 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 -- cgit v1.3.1