security: use correct time unit for role cache expire after write
The role cache was previously using the wrong time unit for its expire after write time; the value passed to the cache was milliseconds instead of nanoseconds. Original commit: elastic/x-pack-elasticsearch@65f7b08763
This commit is contained in:
parent
7ba55a4c99
commit
6284db3a4d
|
@ -135,7 +135,7 @@ public class NativeRolesStore extends AbstractComponent implements RolesStore, C
|
|||
this.client = client;
|
||||
this.roleCache = CacheBuilder.<String, RoleAndVersion>builder()
|
||||
.setMaximumWeight(CACHE_SIZE_SETTING.get(settings))
|
||||
.setExpireAfterWrite(CACHE_TTL_SETTING.get(settings).getMillis())
|
||||
.setExpireAfterWrite(CACHE_TTL_SETTING.get(settings).getNanos())
|
||||
.build();
|
||||
this.isTribeNode = settings.getGroups("tribe", true).isEmpty() == false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue