mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 14:47:57 +08:00
java: adjust cache expiration policy for long running java processes
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user