Yes, but http caching does encourage servers to sync their time with the
internet time servers while also being tolerant of skewed clocks (i.e.
cached content might get served for slightly longer than the origin server
said was valid). I think there are two significant issues needing to be
addressed on caching:
If the origin server said the response can't be cached, no cached
response should ever get served back on later requests (this JIRA/patch
addresses this point)
Section 6.2 of the Gadget-core spec says that the request's refresh
setting overrides the origin server's cache controls. I think this is
invalid ... the refresh param should indicate the default for caching
and potentially reduce the time a response will be cached, but not
increase the time a cached response is considered valid.
Rich Thompson
From: Brian Lillie/Austin/IBM@IBMUS
To: Dan Dumont/Westford/IBM@Lotus, "Stanton Sievers"
<[email protected]>, Brian Lillie/Austin/IBM@IBMUS, "Ryan
Baxter" <[email protected]>,
Cc: Brian Lillie/Austin/IBM@IBMUS, "Xiao Feng Yu"
<[email protected]>, "shindig" <[email protected]>
Date: 04/26/2012 10:57 AM
Subject: Re: Review Request: Update isStale method in HttpResponse to
return true when max-age equals 0
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4877/#review7263
-----------------------------------------------------------
As noted in the JIRA, the issue with the no-cache being returned on the
first request, and the (incorrect) cached response on the second request
occurs due to the modification of the cached response in the
AbstractHttpCache.addResponse. This code slams the request's refresh
interval onto the cache-control headers, and puts that into the cache,
while the original request with no-cache is returned to the user. It
seems like this fix would address only one specific issue, that of an
incoming request with refresh interval = 0. If the refresh interval
specified by the client is sufficiently smaller than the time skew between
the two servers, wouldn't the same issue occur ?
- BrianLillie
On 2012-04-26 02:15:03, Xiao Feng Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4877/
> -----------------------------------------------------------
>
> (Updated 2012-04-26 02:15:03)
>
>
> Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and
Brian Lillie.
>
>
> Summary
> -------
>
> Since max-age=0 means the response expires immediately when the response
is generated, and there is no need to compute TTL with possibly incorrect
server time.
> We can update the isStale method in HttpResponse to return true if
max-age equals 0 instead of relying on computed TTL.
>
>
> This addresses bug SHINDIG-1759.
> https://issues.apache.org/jira/browse/SHINDIG-1759
>
>
> Diffs
> -----
>
>
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java
1330087
>
> Diff: https://reviews.apache.org/r/4877/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Xiao Feng
>
>