mirror of https://github.com/apache/archiva.git
skip when URL is in failure cache
cache proxy failures (404) for better performances git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@610758 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
75a2efd2dd
commit
679b8921cd
|
@ -525,6 +525,11 @@ public class DefaultRepositoryProxyConnectors
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( urlFailureCache.hasFailedBefore( url ) )
|
||||||
|
{
|
||||||
|
throw new NotFoundException( "Url has failed before and cache-failure is enabled on this connector" );
|
||||||
|
}
|
||||||
|
|
||||||
Wagon wagon = null;
|
Wagon wagon = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -547,7 +552,10 @@ public class DefaultRepositoryProxyConnectors
|
||||||
}
|
}
|
||||||
catch ( NotFoundException e )
|
catch ( NotFoundException e )
|
||||||
{
|
{
|
||||||
// Do not cache url here.
|
// public repositories may be slow to access, and many request will fail when
|
||||||
|
// muliple repositories are "merged" by archiva via proxies.
|
||||||
|
// so caching "not found" is usefull here to enhance archiva response-time
|
||||||
|
urlFailureCache.cacheFailure( url );
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
catch ( NotModifiedException e )
|
catch ( NotModifiedException e )
|
||||||
|
|
Loading…
Reference in New Issue