Node federation = repositories.getNode(DNA_FEDERATION_SEGMENT);
if (federation == null) {
I18n msg = FederationI18n.requiredNodeDoesNotExistRelativeToNode;
throw new FederationException(msg.text(DNA_FEDERATION_SEGMENT, repositories.getLocation().getPath()));
}
Property timeToLiveProperty = federation.getProperty(nameFactory.create(CACHE_POLICY_TIME_TO_LIVE_CONFIG_PROPERTY_NAME));
if (timeToLiveProperty != null && !timeToLiveProperty.isEmpty()) {
long timeToCacheInMillis = longFactory.create(timeToLiveProperty.getValues().next());
BasicCachePolicy policy = new BasicCachePolicy(timeToCacheInMillis, TimeUnit.MILLISECONDS);
defaultCachePolicy = policy.getUnmodifiable();
}
// Read the "dna:cache" and its projection ...