使用guava的memoizeWithExpiration方法
ForwardingSystemAccessControl.of(memoizeWithExpiration(
() -> {
log.info("Refreshing system access control from %s", configFileName);
return create(configFileName);
},
refreshPeriod.toMillis(),
MILLISECONDS));