The cached time is the instant that the resource entered the cached.
>From what I can tell from RFC2616, that is supposed to be the value of
the Date header, if it exists, or the instant the response was received.
I believe I modified getServerDate() so that it will never return a
null, so the else return 0 below should actually never execute.
However, I'll couch all of this is a blanket statement that I am not a
caching expert. For some of this, I'm learning as I go.
- James
Garrett Rooney wrote:
> On 8/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>> public long getCachedTime() {
>> - return getServerDate().getTime();
>> + Date serverDate = getServerDate();
>> + if (serverDate != null)
>> + return serverDate.getTime();
>> + else
>> + return 0;
>> }
>
> James, if you could verify that this is the right thing to do in this
> case I'd appreciate it. I ran across this while trying to rig up a
> Jetty based server for the cache tests...
>
> -garrett
>