Skip to content
Snippets Groups Projects
Commit 2153ebb4 authored by Alok Joshi's avatar Alok Joshi
Browse files

add comment

parent ace0e015
No related branches found
No related tags found
2 merge requests!211Updated topics.json - Replace common with osdu as common data partition is not a concept in OSDU.,!159Add cache for Entitlements getGroups() call
Pipeline #91279 failed
......@@ -25,6 +25,7 @@ import org.springframework.stereotype.Component;
@Component
public class GroupVmCache extends VmCache<String, AuthorizationResponse> {
public GroupVmCache(@Value("${app.maxExpireTime:60}") int maxExpireTime, @Value("${app.maxCacheSize:1000}") int maxCacheSize) {
super(MathUtil.generateRandomNumberBetweenBounds(30, 60), 1000);
//randomizing cache TTL will reduce sudden spikes on downstream service because cache in different pods expires at different times
super(MathUtil.generateRandomNumberBetweenBounds(maxExpireTime/2, maxExpireTime), maxCacheSize);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment