You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2023. It is now read-only.
Feature: Add internal cache of Service Client instances (#8)
* Update changelog
* Add client instances object to global config
* Check for cached instance of service
* Add destroy method to remove service from cache
* Remove return
* Fix tests
* Change destroy to remove for service cache
* Update logic for overrides
* Gramar fix
* Updated tests to provide a check against cached instances
* Update README, CHANGELOG, redundant overrides check
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@ For a more thorough collection of examples see the [examples directory](https://
94
94
95
95
Returns a new service client instance for `servicename` with optional `overrides` to the global defaults listed above:
96
96
97
+
*Note: If no `overrides` are provided, when a service client instance is created for a `servicename` it will be stored in a cache. That instance will be returned instead of creating a new instance.*
98
+
97
99
-**protocol** - The protocol to use for the request. Defaults to `"http:"`.
98
100
-**hostname** - The hostname to use for the request. Accepts a `string` or a `function(serviceName, serviceConfig)` that returns a string.
99
101
-**port** - The port number to use for the request.
0 commit comments