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 Tue, 13 Aug 2002 07:10:05 GMT


> -----Original Message-----
> From: Carsten Ziegeler [mailto:cziegeler@s-und-n.de]
> Sent: Monday, August 12, 2002 1:21 PM
> To: cocoon-dev@xml.apache.org
> Subject: RE: Cachable Readers
> 
> 
> Amir Rosen wrote:
> >
> > Ok, what i'm saying is that if the cached version is used, then
> > the methods
> > getLastModified() & getMimeType() should be invoked on the cached
> > object too,
> > thus they shouldn't be called before generateValidity().
> >
> Ok, I think now I (finally - sorry, sometimes it takes a little
> longer) understand it.
> 
> It is assumed that for the same source the reader returns the same
> mimetype on each invokation, so it shouldn't play a role if
> getMimeType() is called on the cached object or not (as the result
> is assumed to be the same).
> 
> The other problem is that the current architecture has to first call
> getLastModified() in order to handle http-expires headers more
> efficient.
> 
> So, in general you're right, but you can implement your reader in the
> following way:
> 
> You implement a private method _generateValidity collect the 
> getLastModified
> and the mimetype of the cached object and store the information in
> your reader implementation.
> Now the getLastModified calls your _generateValitiy() and gets the
> information
> from the cached object etc. Last, in the generateValidity() method you
> return the result from  _generateValitiy().
> So, although the methods are called (from the outside) in a 
> different order,
> your implementation changes this order to the needs of your 
> implementation.
> 

Ok, now it's my turn not to understand :)
How do I access the cached object ?
Do you mean I should Implement the caching by myself ?

Amir 

> Carsten
> 
> 
> ---------------------------------------------------------------------
> 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