* Creates a new cache manager * @param context VS Code extension context * @param workspacePath Path to the workspace
( private context: vscode.ExtensionContext, private workspacePath: string, )
| 20 | * @param workspacePath Path to the workspace |
| 21 | */ |
| 22 | constructor( |
| 23 | private context: vscode.ExtensionContext, |
| 24 | private workspacePath: string, |
| 25 | ) { |
| 26 | this.cachePath = vscode.Uri.joinPath( |
| 27 | context.globalStorageUri, |
| 28 | `roo-index-cache-${createHash("sha256").update(workspacePath).digest("hex")}.json`, |
| 29 | ) |
| 30 | this._debouncedSaveCache = debounce(async () => { |
| 31 | await this._performSave() |
| 32 | }, 1500) |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Initializes the cache manager by loading the cache file |
nothing calls this directly
no test coverage detected