You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Eric Jain (JIRA)" <ji...@apache.org> on 2017/05/24 23:43:04 UTC

[jira] [Commented] (HTTPCLIENT-1460) Cached files would be deleted after CloseableHttpClient being closed.

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

Eric Jain commented on HTTPCLIENT-1460:
---------------------------------------

There's no point in not deleting the FileResources when closing, when the HttpCacheEntries are not persisted as well...

> Cached files would be deleted after CloseableHttpClient being closed.
> ---------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1460
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1460
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpCache
>    Affects Versions: 4.3.2
>            Reporter: Yang Bo
>             Fix For: 4.4 Alpha1
>
>
> I created a `CloseableHttpClient` from `CachingHttpClientBuilder`. I assigned a directory for the `CloseableHttpClient`'s cacheDir.
> The `CloseableHttpClient` worked well for processing requests with cache. But after `CloseableHttpClient.close()` invoked, all cached files were deleted. Therefore, new `CloseableHttpClient` in new JVM cannot reuse original cache. 
> This behavior is different from browsers or JDK's http clients.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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