cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Pfingsthorn" <m.pfingsth...@hippo.nl>
Subject RE: caching for source objects?
Date Tue, 24 Jan 2006 12:35:18 GMT
> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@apache.org]
> Sent: Tuesday, January 24, 2006 13:07
> To: dev@cocoon.apache.org
> Subject: Re: caching for source objects?
> 
> 
> Max Pfingsthorn schrieb:
> > Hello everyone!
> > 
> > I've run into some problems with performance (in general) 
> and I noticed that source objects are not cached... This is 
> not so nice since, for example, WebDAVSources are quite 
> expensive to instantiate.
> > 
> > Would it be a good idea in general if we subclassed the 
> excalibur source resolver's resolveURI() method to add some 
> caching (and delayed release) of the sources, say, using the 
> o.a.excalibur.store.impl.MRUMemoryStore?
> > 
> I think we have a CachingSource implementation somewhere (scratchpad?)
> which can be used as a wrapper around any other source 
> implementation. I
> think this one will fit your use case.

Yes, I saw that one, and it works pretty well. But I thought it would be nicer to have a less
intrusive and transparent way of doing the caching... With the CachingSourceFactory, you have
to use "two" protocols, the caching one and the one you actually want to use. So you end up
with something like:

caching:file://foo.xml

Having a way to swap implementations of the SourceResolver and transparently have source caching
for every source you use (the ones that produce a non-null cache key, of course) would be
nice... Maybe we can take the implementation of the CachingSource/Factory and encapsulate
it in a CachingSourceResolver?

max

Mime
View raw message