mm_cachebase 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -48,6 +48,7 @@ class CacheBase extends Base {
|
|
|
48
48
|
this.is_inited = false;
|
|
49
49
|
this.is_destroyed = false;
|
|
50
50
|
|
|
51
|
+
this.setConfig(config);
|
|
51
52
|
// 初始化服务
|
|
52
53
|
this.init();
|
|
53
54
|
}
|
|
@@ -2367,7 +2368,7 @@ function cachebaseAdmin(scope, config) {
|
|
|
2367
2368
|
var obj = global.$.pool.cachebase[scope];
|
|
2368
2369
|
if (!obj) {
|
|
2369
2370
|
const dbConfig = {
|
|
2370
|
-
file_path: config && config.dir ? '
|
|
2371
|
+
file_path: config && config.dir ? config.dir + '/' + scope + '.json' : '/cache/' + scope + '.json',
|
|
2371
2372
|
...(typeof config === 'object' && config ? config : {})
|
|
2372
2373
|
};
|
|
2373
2374
|
global.$.pool.cachebase[scope] = new CacheBase(dbConfig);
|
|
@@ -2379,5 +2380,5 @@ function cachebaseAdmin(scope, config) {
|
|
|
2379
2380
|
// 导出类
|
|
2380
2381
|
module.exports = {
|
|
2381
2382
|
CacheBase,
|
|
2382
|
-
cachebaseAdmin
|
|
2383
|
+
cachebaseAdmin
|
|
2383
2384
|
};
|