MCPcopy
hub / github.com/opentrace/opentrace / evict

Method evict

ui/src/components/pipeline/concurrent/stages.ts:111–117  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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 {

Callers 2

runMethod · 0.95
concurrent.test.tsFile · 0.80

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected