if (remoteChecksum != null) {
LocallyAvailableResource local = localCandidates.findByHashValue(remoteChecksum);
if (local != null) {
LOGGER.info("Found locally available resource with matching checksum: [{}, {}]", location, local.getFile());
// TODO - should iterate over each candidate until we successfully copy into the cache
return copyToCache(location, fileStore, new CachedExternalResourceAdapter(location, local, delegate, remoteMetaData, remoteChecksum));
}
}
}
// All local/cached options failed, get directly