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


##########
paimon-common/src/main/java/org/apache/paimon/io/cache/CacheManager.java:
##########
@@ -37,69 +33,46 @@ public class CacheManager {
      */
     public static final int REFRESH_COUNT = 10;
 
-    private final Cache<CacheKey, CacheValue> cache;
+    private final InternalCache internalCache;
 
     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(InternalCache.CacheType.CAFFEINE, maxMemorySize);

Review Comment:
   We will introduce an option for the cache type in the next PR, and only 
guava cache can be used in the sort file store



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