* Saves the cache to disk
()
| 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 |
no test coverage detected