Skip to content

Commit

Permalink
Merge pull request #336 from RabotaRu/v3.0.4
Browse files Browse the repository at this point in the history
v3.0.4
  • Loading branch information
rpiontik authored Jul 17, 2023
2 parents 396de34 + 70c0cdc commit ba7a47f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Binary file not shown.
6 changes: 4 additions & 2 deletions public/metamodel/dochub/entities/contexts/plantuml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ entities:
& "\", \""
& "[[/architect/components/" & $domain & " " & $component.title & "]]"
& "\", "
& $domain
& ", )\n";
& $domain
& ", \""
& $component.type
& "\" )\n";
/* Добавляем аспекты */
$result := $result & $join($component.aspects.(
Expand Down
1 change: 1 addition & 0 deletions src/backend/controllers/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default (app) => {
} else {
storeManager.reloadManifest()
.then((storage) => storeManager.applyManifest(app, storage))
.then(cache.clearCache)
.then(() => res.json({ message: 'success' }));
}
});
Expand Down
18 changes: 17 additions & 1 deletion src/backend/storage/cache.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function loadBaseMatamodel() {
}

// Кэш в памяти
const memoryCache = {};
let memoryCache = {};

const errorType = {
system: 'Внутрисистемная ошибка',
Expand All @@ -40,6 +40,22 @@ export default Object.assign(prototype, {
errorClear() {
this.errors = {};
},
clearCache() {
const cacheMode = process.env.VUE_APP_DOCHUB_DATALAKE_CACHE || 'none';
switch (cacheMode.toLocaleLowerCase()) {
case 'none': return;
case 'memory': memoryCache = {}; break;
default: {
const cacheDir = path.resolve(__dirname, '../../../', cacheMode);
fs.readdir(cacheDir, (err, files) => {
if (err) throw err;
for (const file of files) {
fs.unlink(`${cacheDir}/${file}`, err => logger.error(err, LOG_TAG));
}
});
}
}
},
// Регистрирует ошибку
// type - Секция ошибки (system/syntax/net)
// uid - Уникальный идентификатор ошибки.
Expand Down

0 comments on commit ba7a47f

Please sign in to comment.