-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(smithy-client): add handler cache
- Loading branch information
Showing
5 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@smithy/middleware-stack": minor | ||
"@smithy/smithy-client": minor | ||
--- | ||
|
||
add client handler caching |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Handler } from "@smithy/types"; | ||
|
||
import type { Client } from "./client"; | ||
|
||
/** | ||
* @internal | ||
* | ||
* Holds a private handler cache map for individual client instances. | ||
* It is a separate map to avoid changing the shape interface of the Client base class. | ||
* | ||
* The organization is: | ||
* ``` | ||
* Map<Client (instance), Map<Command (constructor), HandlerFn>> | ||
* ``` | ||
*/ | ||
export const clientHandlers = new WeakMap<Client<any, any, any, any>, WeakMap<Function, Handler<any, any>>>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters