result.missing();
// When age == 0, verified since the start of this build, assume still missing
result.setAuthoritative(cachedMetaData.getAgeMillis() == 0);
return;
}
MutableModuleComponentResolveMetaData metaData = cachedMetaData.getMetaData();
metadataProcessor.processMetadata(metaData);
if (dependency.isChanging() || metaData.isChanging()) {
if (cachePolicy.mustRefreshChangingModule(moduleComponentIdentifier, cachedMetaData.getModuleVersion(), cachedMetaData.getAgeMillis())) {
LOGGER.debug("Cached meta-data for changing module is expired: will perform fresh resolve of '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
return;
}
LOGGER.debug("Found cached version of changing module '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
} else {
if (cachePolicy.mustRefreshModule(moduleComponentIdentifier, cachedMetaData.getModuleVersion(), cachedMetaData.getAgeMillis())) {
LOGGER.debug("Cached meta-data for module must be refreshed: will perform fresh resolve of '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
return;
}
}
LOGGER.debug("Using cached module metadata for module '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
metaData.setSource(new CachingModuleSource(cachedMetaData.getDescriptorHash(), metaData.isChanging(), metaData.getSource()));
result.resolved(metaData);
// When age == 0, verified since the start of this build, assume the meta-data hasn't changed
result.setAuthoritative(cachedMetaData.getAgeMillis() == 0);
}