shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHINDIG-1759) Shindig returns the response that should not be cached
Date Wed, 25 Apr 2012 18:56:20 GMT

    [ https://issues.apache.org/jira/browse/SHINDIG-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261947#comment-13261947
] 

jiraposter@reviews.apache.org commented on SHINDIG-1759:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4877/#review7235
-----------------------------------------------------------

Ship it!


LGTM.  This is exactly what I was looking for in our offline conversation.  Thanks.

- Stanton


On 2012-04-25 16:14:08, Xiao Feng Yu wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4877/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-25 16:14:08)
bq.  
bq.  
bq.  Review request for Ryan Baxter, Dan Dumont and Stanton Sievers.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  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.
bq.  We can update the isStale method in HttpResponse to return true if max-age equals 0 instead
of relying on computed TTL.
bq.  
bq.  
bq.  This addresses bug SHINDIG-1759.
bq.      https://issues.apache.org/jira/browse/SHINDIG-1759
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponse.java
1330087 
bq.  
bq.  Diff: https://reviews.apache.org/r/4877/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Xiao Feng
bq.  
bq.


                
> Shindig returns the response that should not be cached
> ------------------------------------------------------
>
>                 Key: SHINDIG-1759
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1759
>             Project: Shindig
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 3.0.0
>            Reporter: Xiao Feng Yu
>              Labels: patch
>             Fix For: 3.0.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> We recently find a issue with Shindig cache. The problem can be happens with the following
conditions
> 1) Client perform a makeRequest call with refresh equals 0.
> 2) The clock of web resource server is about 1.5 minutes faster than the clock of Shindig
server
> 3) The web resource server returns the resource with Cache-Control header set to no-cache.
> When user A perform a makeRequest call to the web resource, it will get the response
correctly, and then the second user B performs the same makeRequest call, Shindig returns
the cached response. But in fact, it should not, because refresh equals 0 is specified and
Cache-Control: no-cache is present in the response.
> The reason is beause refresh equals 0 will override the cache-control:no-cache header
in response with Cache-Control:public,max-age=0 header. And the next time, the cached response
retrieved, the TTL of the cached response will be calculated by Date header. And because of
the clock skew (Shindig only fix the time drift larger than 3 minutes), it leaves a time window
in which the cached response will be returned, while it should not be. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message