Skip to content

Commit

Permalink
caching limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ggershinsky committed Sep 12, 2024
1 parent 6e7de37 commit 1c03cd1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ private TransientEncryptionState(KeyManagementClient kmsClient) {
this.encryptionKeys = Maps.newLinkedHashMap();
this.unwrappedKeyCache =
Caffeine.newBuilder()
.expireAfterWrite(1, TimeUnit.MINUTES)
.maximumSize(1000)
.expireAfterWrite(1, TimeUnit.DAYS)
.build(wrappedKey -> kmsClient.unwrapKey(wrappedKey, tableKeyId));
this.currentEncryptionKey = null;
}
Expand Down

0 comments on commit 1c03cd1

Please sign in to comment.