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.
Carsten > -----Original Message----- > From: Hunsberger, Peter [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 02, 2004 3:51 PM > To: [EMAIL PROTECTED] > 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 > > > > > > > >
