MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / _performSave

Method _performSave

src/services/code-index/cache-manager.ts:55–66  ·  view source on GitHub ↗

* Saves the cache to disk

()

Source from the content-addressed store, hash-verified

53 * Saves the cache to disk
54 */
55 private async _performSave(): Promise<void> {
56 try {
57 await safeWriteJson(this.cachePath.fsPath, this.fileHashes)
58 } catch (error) {
59 console.error("Failed to save cache:", error)
60 TelemetryService.instance.captureEvent(TelemetryEventName.CODE_INDEX_ERROR, {
61 error: error instanceof Error ? error.message : String(error),
62 stack: error instanceof Error ? error.stack : undefined,
63 location: "_performSave",
64 })
65 }
66 }
67
68 /**
69 * Clears the cache file by writing an empty object to it

Callers 2

constructorMethod · 0.95
flushMethod · 0.95

Calls 4

safeWriteJsonFunction · 0.90
errorMethod · 0.65
StringInterface · 0.50
captureEventMethod · 0.45

Tested by

no test coverage detected