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. Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]