cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Rosen" <a...@cti2.com>
Subject RE: Cachable Readers
Date Wed, 07 Aug 2002 10:10:00 GMT


> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Sent: Wednesday, August 07, 2002 10:53 AM
> To: cocoon-dev@xml.apache.org
> Subject: RE: Cachable Readers
> 
> 
> 
> Amir Rosen wrote:
> > 
> > I'm using cocoon 2.0.3.
> > I'm writing a class extending AbstractReader, and 
> implementing Cacheable.
> > When a Reader is used, the order the methods are called is:
> > getMimeType()
> > getLastModified()
> > generateValidity()
> > 
> > Thus, getLastModified() & generateValidity() are called on the 
> > new reader created, and not on the "right" reader that is known
> > only after the validity check.
> > 
> > I hope i explained myself better this time.
> > 
> Ok, now I got the first part, the order of the methods called, but 
> what do you mean by "right" reader?
> 
> Usually, when the first method is called (= getMimeType() ) the
> reader should collect all necessary information (mime type, 
> last modified,
> validity etc.) and return only the mime type. When then the next
> method is called (= getLastModified() ), the previous collected
> information is returned etc.
> 
> Does this make sense?
> 
> Carsten 
> 

By the "right" reader I mean the new reader or the cached reader,
choosen by the validity check.
For performance reasons, I wouldn't want my new reader to collect
any unnecessary data, unless it is going to be used, which should 
be check by the CacheValidity object.
Anyway, getLastModified() & getMimeType(), should be called on the
cached reader and not the new reader, if it's generate() is going
to be called.

Amir

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message