Skip to content

Commit 3b51ef4

Browse files
committed
refactor: remove wrapper cache
1 parent 44ecf96 commit 3b51ef4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/core/src/shared/clients/clientWrapper.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ export abstract class ClientWrapper<C extends AwsClient> implements vscode.Dispo
1515
private readonly clientType: AwsClientConstructor<C>
1616
) {}
1717

18-
protected async getClient() {
19-
if (this.client) {
20-
return this.client
18+
protected async getClient(noCache: boolean = false) {
19+
if (noCache) {
20+
return await globals.sdkClientBuilderV3.createAwsService(this.clientType, undefined, this.regionCode)
2121
}
22-
this.client = await globals.sdkClientBuilderV3.getAwsService(this.clientType, undefined, this.regionCode)
23-
return this.client!
22+
return await globals.sdkClientBuilderV3.getAwsService(this.clientType, undefined, this.regionCode)
2423
}
2524

2625
protected async makeRequest<CommandInput extends object, Command extends AwsCommand>(

0 commit comments

Comments
 (0)