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 Thu, 02 Sep 2004 13:51:03 GMT
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