rdblue commented on code in PR #14440:
URL: https://github.com/apache/iceberg/pull/14440#discussion_r3364784651
##########
core/src/main/java/org/apache/iceberg/CachingCatalog.java:
##########
@@ -104,15 +165,25 @@ public void onRemoval(TableIdentifier tableIdentifier,
Table table, RemovalCause
}
private Cache<TableIdentifier, Table> createTableCache(Ticker ticker) {
- Caffeine<Object, Object> cacheBuilder = Caffeine.newBuilder().softValues();
+
+ if (expirationIntervalMillis <= 0 && expireAfterWriteIntervalMillis <= 0) {
+ return Caffeine.newBuilder().softValues().build();
Review Comment:
I think this could have fewer changes. We don't need to add early return
here. Just configure the builder using if statements and return once.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]