change local cache prefix

This commit is contained in:
Hassan Yousefi 2023-09-04 14:03:08 +03:30
parent ff3df49344
commit 1a70e2a0a1
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View file

@ -130,7 +130,8 @@ dist
.pnp.* .pnp.*
# local cache prefix # local cache prefix
__MMSLM_CACHE__/ __MMT_CACHE__/
# local config file # local config file
config.local.yml config.local.yml
.DS_Store

View file

@ -21,7 +21,7 @@ const cacheDir = args['cache-dir'] || config.CACHE_DIR;
const defaultPath = args.path || config.DEFAULT_PATH || 'v1'; const defaultPath = args.path || config.DEFAULT_PATH || 'v1';
const verbose = args.verbose || config.LOG_REQUESTS || false; const verbose = args.verbose || config.LOG_REQUESTS || false;
const cacheBaseDir = path.resolve(cacheDir, '__MMSLM_CACHE__'); const cacheBaseDir = path.resolve(cacheDir, '__MMT_CACHE__');
if (!fs.existsSync(path.resolve(cacheBaseDir, '_tmp_'))) { if (!fs.existsSync(path.resolve(cacheBaseDir, '_tmp_'))) {
fs.mkdirSync(path.resolve(cacheBaseDir, '_tmp_'), { recursive: true }); fs.mkdirSync(path.resolve(cacheBaseDir, '_tmp_'), { recursive: true });