1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-29 22:00:42 +02:00

java: adjust cache expiration policy for long running java processes

This commit is contained in:
Chris Lu 2021-10-09 05:38:15 -07:00
parent 17e08a16f4
commit 5ca0a551ac
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ public class ChunkCache {
} }
this.cache = CacheBuilder.newBuilder() this.cache = CacheBuilder.newBuilder()
.maximumSize(maxEntries) .maximumSize(maxEntries)
.expireAfterAccess(1, TimeUnit.HOURS) .expireAfterWrite(1, TimeUnit.HOURS)
.build(); .build();
} }

View file

@ -15,7 +15,7 @@ public class VolumeIdCache {
} }
this.cache = CacheBuilder.newBuilder() this.cache = CacheBuilder.newBuilder()
.maximumSize(maxEntries) .maximumSize(maxEntries)
.expireAfterAccess(5, TimeUnit.MINUTES) .expireAfterWrite(5, TimeUnit.MINUTES)
.build(); .build();
} }