Chore: fix leak thread

This commit is contained in:
SukkaW
2023-12-24 00:58:04 +08:00
parent a109091b3e
commit d7c8bf8d11
4 changed files with 26 additions and 27 deletions

View File

@@ -121,9 +121,16 @@ export class Cache {
}
return value;
}
destroy() {
this.db.close();
}
}
export const fsCache = new Cache({ cachePath: path.resolve(import.meta.dir, '../../.cache') });
// export const fsCache = new Cache({ cachePath: path.resolve(import.meta.dir, '../../.cache') });
// process.on('exit', () => {
// fsCache.destroy();
// });
const separator = String.fromCharCode(0);