Hi,
I've implemented a custom Reader to read file
entities out of my database. Because these file entities span across
multiple tables and are managed thru my J2EE container, I'd like to implement
some browser-side caching to prevent excessive generation on the server
side.
In my reader, which extends AbstractReader, I
overrode
long
getLastModified()
Which is being called correctly and does return the
time correctly (derived upon file creation/modification using
System.currentTimeMillis()).
However, the behavior I'm seeing is that whenever I
request a resource that uses this reader to generate the byte data, the reader's
getLastModified() method is first called, and then the generate() method is
ALWAYS called.
It is my understanding that the browser would not
further request the resource if its version was up to date with that of the
server. I understand that every browser implementation is different, but
I'm wonderig if I am doing something wrong. I would like for the reader
not to have its generate() method called when not
necessary. Is this the correct way to think about this?
I tested with the same result on IE6 and
Phoenix0.5.
thanks,--
Collin
|