JingsongLi commented on code in PR #4389:
URL: https://github.com/apache/paimon/pull/4389#discussion_r1821920248


##########
paimon-common/src/main/java/org/apache/paimon/io/cache/CacheManager.java:
##########
@@ -39,68 +35,45 @@ public class CacheManager {
      */
     public static final int REFRESH_COUNT = 10;
 
-    private final Cache<CacheKey, CacheValue> cache;
+    private final Cache cache;
 
     private int fileReadCount;
 
     public CacheManager(MemorySize maxMemorySize) {
-        this.cache =
-                Caffeine.newBuilder()
-                        .weigher(this::weigh)
-                        .maximumWeight(maxMemorySize.getBytes())
-                        .removalListener(this::onRemoval)
-                        .executor(Runnable::run)
-                        .build();
+        this(Cache.CacheType.CAFFEINE, maxMemorySize);

Review Comment:
   Maybe can we just use guava directly?



-- 
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]

Reply via email to