File tree 2 files changed +3
-3
lines changed
main/java/com/amazonaws/encryptionsdk/kms
test/java/com/amazonaws/encryptionsdk/kms 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class Builder {
89
89
private ClientConfiguration clientConfiguration ;
90
90
private Set <String > allowedRegions = Collections .emptySet ();
91
91
private Set <String > excludedRegions = Collections .emptySet ();
92
- private boolean clientCachingEnabled = false ;
92
+ private boolean clientCachingEnabled = true ;
93
93
private final Map <String , AWSKMS > clientsCache = new HashMap <>();
94
94
private static final Set <String > AWSKMS_METHODS = new HashSet <>();
95
95
private AWSKMSClientBuilder awsKmsClientBuilder ;
@@ -188,7 +188,8 @@ public Builder excludedRegions(Set<String> regions) {
188
188
}
189
189
190
190
/**
191
- * When set to true, allows for the AWSKMS client for each region to be cached and reused.
191
+ * When set to false, disables the AWSKMS client for each region from being cached and reused.
192
+ * By default, client caching is enabled.
192
193
*
193
194
* @param enabled Whether or not caching is enabled.
194
195
*/
Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ void testClientCachingDisabled() {
128
128
@ Test
129
129
void testClientCaching () {
130
130
AwsKmsClientSupplier supplier = new AwsKmsClientSupplier .Builder (kmsClientBuilder )
131
- .clientCaching (true )
132
131
.build ();
133
132
134
133
when (kmsClientBuilder .withRegion (REGION_1 )).thenReturn (kmsClientBuilder );
You can’t perform that action at this time.
0 commit comments