Skip to content

Commit 1e57858

Browse files
authored
fix(core): remove file cache from folder after deleting bot (#1782)
1 parent 1b6375a commit 1e57858

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/bp/src/core/bpfs/ghost-service.ts

+5
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ export class ScopedGhostService {
423423
await this.cache.invalidate(this.bufferCacheKey(fileName))
424424
}
425425

426+
private async _invalidateFolder(folderName: string) {
427+
await this.cache.invalidateStartingWith(folderName)
428+
}
429+
426430
async invalidateFile(rootFolder: string, fileName: string): Promise<void> {
427431
const filePath = this._normalizeFileName(rootFolder, fileName)
428432
await this._invalidateFile(filePath)
@@ -680,6 +684,7 @@ export class ScopedGhostService {
680684

681685
const folderName = this._normalizeFolderName(folder)
682686
await this.primaryDriver.deleteDir(folderName)
687+
await this._invalidateFolder(folderName)
683688
}
684689

685690
async directoryListing(

0 commit comments

Comments
 (0)