java: adjust cache expiration policy for long running java processes

This commit is contained in:
Chris Lu committed 2021-10-09 05:38:15 -07:00
1 parent 17e08a16f4
commit 5ca0a551ac
2 files changed
+2 -2

No files matched your search

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