Based on our implementation experience, we feel that the ResponseCacheHandler API needs some adjustments in order to render it more effective.
First, the current API would lead to caching the response body in the protocol handler upon receiving the response, doing so would have performance problems because the protocol handler has to do extra work before returning the response body to the caller, rather, the caching of response body is better driven by application reading the data and/or keep-alive cache trying to clean up the pipe.
Secondly, one additional parameter is added to ResponseCacheHandler.get() and ResponseCacheHandler.put() to align them more closely to the RFC specification.