[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864982#action_12864982
 ] 

Joe Campbell commented on HTTPCLIENT-427:
-----------------------------------------

Sebastian,
     The volatile keyword effects the multi-thread visibility of the value 
located in the AtomicLong.  To be appropriate, the volatile keyword should 
remain.  From the util.concurrent java doc:

"In essence, the classes in this package extend the notion of volatile values, 
fields, and array elements to those that also provide an atomic conditional 
update operation of the form..."

volatility and atomicity are not the same by this notation, would you be ok 
with putting that keyword back?

Also - I am curious about the @Immutable annotation in reference to the 
CacheInvalidator... by your definition CacheInvalidator is not immutable 
because a member variable of the invalidator can change internally (meaning 
things can be added and removed from the cache) - I am unclear though why this 
'cache' mutability effects the mutability of the Invalidator class.  Once the 
Cache is set on the CacheInvalidator it can only be changed if the cache is 
reconstructed/replaced (i.e. a new instance of the CacheInvalidator is needed 
to change the cache it uses).  

Thanks,
    Joe

> Implement a cache to perform real request only when needed
> ----------------------------------------------------------
>
>                 Key: HTTPCLIENT-427
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-427
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Marc Guillemot
>             Fix For: 4.1 Alpha2
>
>         Attachments: caching_client.zip, 
> HTTPCLIENT-427-Immutable-CacheEntry2.patch, 
> HTTPCLIENT-427-immutable-cachenentry.patch, httpclient-cache.zip
>
>
> Browsers may cache received content according to the values of different
> response headers. It would be great if HttpClient could do the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to