You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Gordon Henriksen <go...@mac.com> on 2006/06/02 22:10:51 UTC

Negative caching in the local repository?

Since central is usually slow during the day, it can be pretty  
painful that Maven's local repository does not cache negative  
responses. Maybe Maven could stash away the URL and response date for  
404's so that it won't try again for a day or two, unless forced to  
refresh? (5xx's should not be cached, though.)

For instance, if the Eclipse plugin is configured to download the  
source jars, it tries to download the same archives every time, even  
though the source archives do not exist for many artifacts. During  
the day when central is overloaded, this means that generating  
Eclipse projects may take 5 minutes or more for even a moderately  
sized source tree. A similar situation occasionally happens if  
artifacts are missing pom files; xml-apis:xml-apis:1.3.03:jar has no  
pom, for instance, and our build winds up pinging that on a fairly  
regular basis, with an utterly predictable response.

Would be nice if Maven could thread HTTP connections and pipeline  
HTTP requests when possible, too; that could hide some latency from  
central. If central is taking 3 seconds to respond to each GET, that  
adds up to 60 seconds pretty quickly.

— G



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Negative caching in the local repository?

Posted by Gordon Henriksen <go...@mac.com>.
Oops, that already got answered. Never mind.

On 2006-06-05, at 11:02, Gordon Henriksen wrote:

> On 2006-06-03, at 00:05, Brett Porter wrote:
>
>> These are all things I have given thought to and would like to see  
>> them worked on in Maven 2.1/2.2. There are a couple of jira issues  
>> already filed for some of these specifics.
>
> How about Pragma: no-cache…?

— G



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Negative caching in the local repository?

Posted by Gordon Henriksen <go...@mac.com>.
On 2006-06-03, at 00:05, Brett Porter wrote:

> These are all things I have given thought to and would like to see  
> them worked on in Maven 2.1/2.2. There are a couple of jira issues  
> already filed for some of these specifics.

How about Pragma: no-cache…?

— G


Begin forwarded message:

> Here's a GET that Maven 2.0.4 generated:
>
>> GET /maven/mirror/ibiblio/org/apache/maven/plugins/maven-surefire- 
>> plugin/2.2-SNAPSHOT/maven-surefire-plugin-2.2-SNAPSHOT.pom HTT
>> P/1.1
>> Pragma: no-cache
>> User-Agent: Java/1.5.0_06
>> Host: example.com
>> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>> Connection: keep-alive
>> Content-type: application/x-www-form-urlencoded
>
> Is there a way to disable the no-cache pragma? I set up a caching  
> reverse proxy of ibiblio (i.e., a partial mirror), and was  
> surprised when Maven disabled it.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Negative caching in the local repository?

Posted by Brett Porter <br...@apache.org>.
These are all things I have given thought to and would like to see them 
worked on in Maven 2.1/2.2. There are a couple of jira issues already 
filed for some of these specifics.

- Brett

Gordon Henriksen wrote:
> Since central is usually slow during the day, it can be pretty painful 
> that Maven's local repository does not cache negative responses. Maybe 
> Maven could stash away the URL and response date for 404's so that it 
> won't try again for a day or two, unless forced to refresh? (5xx's 
> should not be cached, though.)
> 
> For instance, if the Eclipse plugin is configured to download the source 
> jars, it tries to download the same archives every time, even though the 
> source archives do not exist for many artifacts. During the day when 
> central is overloaded, this means that generating Eclipse projects may 
> take 5 minutes or more for even a moderately sized source tree. A 
> similar situation occasionally happens if artifacts are missing pom 
> files; xml-apis:xml-apis:1.3.03:jar has no pom, for instance, and our 
> build winds up pinging that on a fairly regular basis, with an utterly 
> predictable response.
> 
> Would be nice if Maven could thread HTTP connections and pipeline HTTP 
> requests when possible, too; that could hide some latency from central. 
> If central is taking 3 seconds to respond to each GET, that adds up to 
> 60 seconds pretty quickly.
> 
> — G
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


-- 
Brett Porter <br...@apache.org>
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org