ferdnyc commented on code in PR #33: URL: https://github.com/apache/maven-build-cache-extension/pull/33#discussion_r1261966151
########## src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java: ########## @@ -165,9 +166,28 @@ public Optional<byte[]> getResourceContent( String url ) throws IOException transporter.get( task ); return Optional.of( task.getDataBytes() ); } + catch ( ResourceDoesNotExistException e ) + { + if ( LOGGER.isDebugEnabled() ) + { + LOGGER.debug( "Cache item not found: {}", getFullUrl( url ), e ); + } + else + { + LOGGER.info( "Cache item not found: {}", getFullUrl( url ) ); + } + return Optional.empty(); + } catch ( Exception e ) { - LOGGER.info( "Cannot download {}", getFullUrl( url ), e ); + if ( LOGGER.isDebugEnabled() ) + { + LOGGER.debug( "Cannot download cache item {}", getFullUrl( url ), e ); + } + else + { + LOGGER.error( "Cannot download cache item {}: {}", getFullUrl( url ), e ); + } Review Comment: @alexthomasmc Is this the remote cache "not working", though, or can this also just represent a cache miss / expired cache? Cache misses certainly are not errors, heck they're not even problems, they're a standard aspect of how caching works. Data stored in a cache can be wiped out at any moment, for any reason (or even no reason at all). Caches go missing all the time. When a build system fails to obtain a cached artifact, it simply needs to generate it anew. It can do that, it has the technology. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org