const blobCache: { [hash: string]: string } = {}; export class BlobCache { static get(hash: string): string { return blobCache[hash]; } static store(hash: string, value: string): void { if (blobCache[hash]) return; blobCache[hash] = value; } static removeByValue(value: string): void { const keys = Object.keys(blobCache).filter((key) => blobCache[key] === value); keys.forEach((key) => delete blobCache[key]); } }