mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
Cache the blobs generated by scripts
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ScriptUrl } from "../Script/ScriptUrl";
|
||||
|
||||
const importCache: { [hash: string]: ScriptUrl[] } = {};
|
||||
|
||||
export class ImportCache {
|
||||
static get(hash: string) {
|
||||
return importCache[hash];
|
||||
}
|
||||
|
||||
static store(hash: string, value: ScriptUrl[]): void {
|
||||
if (importCache[hash]) return;
|
||||
importCache[hash] = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user