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

Adam Patacchiola commented on HTTPCLIENT-1347:
----------------------------------------------

Thanks for the detailed breakdown.

Agreed that there are two cache entries, one for the variant and one for the 
parent. Disagreed that this is correct (as far as the cache STORAGE is 
concerned). Suppose I'm caching 1GB files, this means I'm caching 2GB for every 
url in this case, which is absurd. If i'm hitting the url 
http://localhost:8000/1 there should only be one cache entry for that url. 
Whether or not gzip compression is used is besides the point. The variant key 
should be abstracted from the cache storage, the cache storage implementation 
should only ever see what you are calling the parent url. 

(Also the variant key is "{Accept-Encoding=}http://localhost:8000/2";... there 
is no gzip after the =. )

> gzip responses doubly cached
> ----------------------------
>
>                 Key: HTTPCLIENT-1347
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1347
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpCache
>    Affects Versions: 4.2.5
>         Environment: ARCH Linux kernel 3.8.8-1
> node.js 0.8.22
>            Reporter: Adam Patacchiola
>             Fix For: 4.4 Final
>
>         Attachments: Screen Shot 2014-01-11 at 7.11.36 PM.png, Screen Shot 
> 2014-01-13 at 3.56.19 PM.png, Showing_entry_pointer.png, 
> httpClientCacheTest.tar.gz, httpClientTestServer.js
>
>
> Compressed responses are cached twice. 
> Run the attached server (node.js 0.8.22) and client tests. Create an "assets" 
> directory under where you are running the server and add two files named 1 
> and 2 ( < 1000000 bytes) . You will see that after the test is run the cache 
> dump output displays 2 sets of entries for each request, each containing the 
> full content length of the file.
> Changing the implementation of HttpCacheStorage updateEntry to not update non 
> existent entries (as I believe the correct implementation should do) throws 
> exceptions. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to