mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: optimize instanceMetadataCacheSize
This commit is contained in:
parent
22522c099d
commit
22db37cad9
@ -33,13 +33,14 @@ public class InstanceMetadataService implements InitializingBean {
|
||||
|
||||
@Value("${oms.instance.metadata.cache.size}")
|
||||
private int instanceMetadataCacheSize;
|
||||
private static final int CACHE_CONCURRENCY_LEVEL = 4;
|
||||
private static final int CACHE_CONCURRENCY_LEVEL = 16;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
instanceId2JobInfoCache = CacheBuilder.newBuilder()
|
||||
.concurrencyLevel(CACHE_CONCURRENCY_LEVEL)
|
||||
.maximumSize(instanceMetadataCacheSize)
|
||||
.softValues()
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user