cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@STJUDE.ORG>
Subject RE: Can Readers cache?
Date Fri, 03 Sep 2004 13:19:35 GMT
Carsten Ziegeler <cziegeler@apache.org> writes:
> 
> Readers can cache :) and I think your code does the right 
> things. You can debug the AbstractCachingProcessingPipeline 
> and see if your reader is checked properly which means if the 
> instanceof  CacheableProcessingComponent is called.

Ok, the reader was in a non-caching pipeline.  Once I moved it into a
caching pipeline no problem....

> > -----Original Message-----
> > From: Hunsberger, Peter [mailto:Peter.Hunsberger@STJUDE.ORG]
> > Sent: Thursday, September 02, 2004 3:51 PM
> > To: dev@cocoon.apache.org
> > Subject: RE: Can Readers cache?
> > 
> > I never got a response to this so I thought I'd ask again....
> > 
> > Can anyone validate that it is possible to get a Reader to
> > Cache properly?  As far as I can tell it does not ever work.
> > 
> > > 
> > > I've got a situation where I'd like to cache the output 
> of a reader
> > > (it's producing CSS).  I have a reader that extends one of 
> > our classes
> > > defined as follows:
> > > 
> > > 	public abstract class AbstractCtReader extends AbstractReader
> > > implements CacheableProcessingComponent {
> > > 
> > > This class includes:
> > > 
> > >     public abstract java.io.Serializable getKey();
> > > 
> > >     public abstract SourceValidity getValidity();
> > > 
> > > The reader in question then has:
> > > 
> > > 	public class StyleSheetReader extends AbstractCtReader {
> > > 
> > > And:
> > > 
> > >     public java.io.Serializable getKey() {
> > >         keyValue = "styleData_" + this.getServiceId() + 
> > >                     "-" + 
> > > this.outData.getTemplateData().getScreenId();
> > >         return keyValue;
> > >     }
> > > 
> > >     public SourceValidity getValidity() {
> > >         if (keyValue != null) {
> > >             return new CtSourceValidity(keyValue);
> > >         }
> > >         return null;
> > >     }
> > > 
> > > Debugging reveals that the getKey and getValidity methods
> > are not ever
> > > called????
> > > 
> > > This is on Cocoon 2.1.4
> > > 
> > > Peter Hunsberger
> > > 
> > > 
> > > 
> > 
> > 
> 
> 
> 


Mime
View raw message