diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index a1111119974..d5c13d42849 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -910,7 +910,7 @@ export class CipherService implements CipherServiceAbstraction { userId: UserId, orgAdmin?: boolean, ): Promise { - return firstValueFrom( + const resultCipherView = firstValueFrom( this.sdkService.userClient$(userId).pipe( map(async (sdk) => { if (!sdk) { @@ -932,6 +932,8 @@ export class CipherService implements CipherServiceAbstraction { }), ), ); + await this.clearCache(userId); + return resultCipherView; } private async createWithServer_legacy( @@ -986,7 +988,7 @@ export class CipherService implements CipherServiceAbstraction { originalCipherView?: CipherView, orgAdmin?: boolean, ): Promise { - return firstValueFrom( + const resultCipherView = firstValueFrom( this.sdkService.userClient$(userId).pipe( map(async (sdk) => { if (!sdk) { @@ -1012,6 +1014,8 @@ export class CipherService implements CipherServiceAbstraction { }), ), ); + await this.clearCache(userId); + return resultCipherView; } async updateWithServer_legacy(