> On 2012-04-26 14:56:26, BrianLillie wrote: > > 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 ?
Hmmm... In my experience a max-age on a cache response indicates the maximum period of time before you should toss out the whole cached object and ask again. Not that you shouldn't ask until you've hit the max-age (which i thought what expires was for). So should we treat all responses as stale if they come back with max-age so that we can ask with a last-modified query? I think this is what browsers do. - Dan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4877/#review7263 ----------------------------------------------------------- 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 > >
