rdblue commented on code in PR #7770:
URL: https://github.com/apache/iceberg/pull/7770#discussion_r1701018047


##########
core/src/main/java/org/apache/iceberg/encryption/StandardEncryptionManager.java:
##########
@@ -51,6 +69,8 @@ public StandardEncryptionManager(
     this.tableKeyId = tableKeyId;
     this.kmsClient = kmsClient;
     this.dataKeyLength = dataKeyLength;
+    this.kekCacheTimeout = kekCacheTimeout;
+    this.kekCache = Maps.newHashMap();

Review Comment:
   Should this use a `Cache` that has a time-based eviction policy? (See the 
[Caffeine 
javadocs](https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/2.1.0/com/github/benmanes/caffeine/cache/Caffeine.html))
   
   ```java
      LoadingCache<String, ByteBuffer> kekCache = Caffeine.newBuilder()
          .expireAfterWrite(kekCacheTimeout, TimeUnit.MINUTES)
          .build(key -> unwrapKey(key));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to