* Remove a file from the raw cache (e.g. after extraction is done). * Frees the JS string so GC can reclaim the memory.
(fileId: string)
| 109 | * Frees the JS string so GC can reclaim the memory. |
| 110 | */ |
| 111 | evict(fileId: string): void { |
| 112 | const content = this.cache.get(fileId); |
| 113 | if (content) { |
| 114 | this.bytesUsed -= content.length * 2; |
| 115 | this.cache.delete(fileId); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | /** Current bytes used by the cache. */ |
| 120 | getBytesUsed(): number { |
no test coverage detected