You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Dennis Cook <de...@bevocal.com> on 2005/01/07 23:15:35 UTC

RE: HttpClient API redesign: high level component architecture (d raft 1)

Ortwin,

I understand that actually providing a cache implementation would be beyond
the scope, but if an interface and empty stub provided, the implementation
could be left to a contrib or an excercise for the user.

Dennis Cook


-----Original Message-----
From: Ortwin Glück [mailto:ortwin.glueck@nose.ch]
Sent: Friday, January 07, 2005 10:36 AM
To: HttpClient Project
Subject: Re: HttpClient API redesign: high level component architecture
(d raft 1)


Dennis,

The issue of caching has been turned down in the past several times. 
Caching is out of our focus and would open a huge can of worms.

Cache parameters (size, expiry algorithms)? Storage (DB, file system, 
single file, hashtable-like directory structure like Squid)? Interfering 
with the cache? Access control? etc.

Ortwin Glück

Dennis Cook wrote:
> If this is a wish list, an http-localcache would be nice as well.

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

Re: HttpClient API redesign: high level component architecture (d raft 1)

Posted by Ortwin Glück <or...@nose.ch>.
Dennis Cook wrote:
> Ortwin,
> 
> I understand that actually providing a cache implementation would be beyond
> the scope, but if an interface and empty stub provided, the implementation
> could be left to a contrib or an excercise for the user.
> 
> Dennis Cook


Dennis,

isn't the interface there already? It's called HttpClient. It's not 
litartally an interface, but you can always subclass it and wrap the 
cache around Http Client.

HttpClient client = new CachingHttpClient();
HttpMethod get = new GetMethod("http://....");
client.exeucte(get);


If you like you can also implement the cache on a per-method level:

HttpClient client = new HttpClient();
HttpMethod get = new CachingGetMethod("http://....");
client.exeucte(get);

So, if we are not going to implement the actual caching, there isn't 
much left to do really.

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