You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Jon Moore (JIRA)" <ji...@apache.org> on 2013/06/13 17:29:20 UTC

[jira] [Comment Edited] (HTTPCLIENT-1370) Response to Non-GET Requests Should Never be Cached With the Default Response CachingPolicy

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

Jon Moore edited comment on HTTPCLIENT-1370 at 6/13/13 3:28 PM:
----------------------------------------------------------------

James, I understand that, but this isn't part of the responsibility of the ResponseCachingPolicy. The way the current codebase is designed, cacheability that is determined purely by properties of the request is governed by the CacheableRequestPolicy, not the ResponseCachingPolicy. Re-implementing this check here would violate DRY. In particular, the test case you've provided is already covered by the end-to-end test I've mentioned already as well as the unit test TestCacheableResponsePolicy#testIsArbitraryMethodServableFromCache.

                
      was (Author: jonm):
    James, I understand that, but this isn't part of the responsibility of the ResponseCachingPolicy. The way the current codebase is designed, cacheability that is determined purely by properties of the request are governed by the CacheableRequestPolicy, not the ResponseCachingPolicy. Re-implementing this check here would violate DRY. In particular, the test case you've provided is already covered by the end-to-end test I've mentioned already as well as the unit test TestCacheableResponsePolicy#testIsArbitraryMethodServableFromCache.

                  
> Response to Non-GET Requests Should Never be Cached With the Default Response CachingPolicy
> -------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1370
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1370
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: CacheHttpClient Caching components
>    Affects Versions: 4.3 Beta2
>            Reporter: James Leigh
>              Labels: patch
>             Fix For: 4.3 Beta3
>
>         Attachments: HTTPCLIENT-1370.patch
>
>
> HttpClient caches response to non-GET requests when a shared cache is used and an Authorization header is present with Cache-Control: public.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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