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

Method clearCacheFile

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

* Clears the cache file by writing an empty object to it

()

Source from the content-addressed store, hash-verified

69 * Clears the cache file by writing an empty object to it
70 */
71 async clearCacheFile(): Promise<void> {
72 try {
73 await safeWriteJson(this.cachePath.fsPath, {})
74 this.fileHashes = {}
75 } catch (error) {
76 console.error("Failed to clear cache file:", error, this.cachePath)
77 TelemetryService.instance.captureEvent(TelemetryEventName.CODE_INDEX_ERROR, {
78 error: error instanceof Error ? error.message : String(error),
79 stack: error instanceof Error ? error.stack : undefined,
80 location: "clearCacheFile",
81 })
82 }
83 }
84
85 /**
86 * Gets the hash for a file path

Callers 4

clearIndexDataMethod · 0.80
startIndexingMethod · 0.80
clearIndexDataMethod · 0.80

Calls 4

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

Tested by

no test coverage detected