From d6073f638670c24f3eb189b7d74dfaebd477fbff Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 3 Aug 2020 00:40:23 -0700 Subject: [PATCH] ensure GC --- other/java/client/src/main/java/seaweedfs/client/ChunkCache.java | 1 + 1 file changed, 1 insertion(+) diff --git a/other/java/client/src/main/java/seaweedfs/client/ChunkCache.java b/other/java/client/src/main/java/seaweedfs/client/ChunkCache.java index 58870d742..7afa2dca0 100644 --- a/other/java/client/src/main/java/seaweedfs/client/ChunkCache.java +++ b/other/java/client/src/main/java/seaweedfs/client/ChunkCache.java @@ -15,6 +15,7 @@ public class ChunkCache { } this.cache = CacheBuilder.newBuilder() .maximumSize(maxEntries) + .weakValues() .expireAfterAccess(1, TimeUnit.HOURS) .build(); }