You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ok2c (via GitHub)" <gi...@apache.org> on 2023/06/21 20:46:04 UTC

[GitHub] [httpcomponents-client] ok2c commented on a diff in pull request #460: HTTPCLIENT-2277: Revision and optimization of cache key generation

ok2c commented on code in PR #460:
URL: https://github.com/apache/httpcomponents-client/pull/460#discussion_r1237675871


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java:
##########
@@ -90,11 +91,15 @@ public BasicHttpAsyncCache(final ResourceFactory resourceFactory, final HttpAsyn
 
     @Override
     public String generateKey(final HttpHost host, final HttpRequest request, final HttpCacheEntry cacheEntry) {
-        if (cacheEntry == null) {
-            return cacheKeyGenerator.generateKey(host, request);
-        } else {
-            return cacheKeyGenerator.generateKey(host, request, cacheEntry);
+        final String root = cacheKeyGenerator.generateKey(host, request);

Review Comment:
   @arturobernalg I am aware. I am working on a major refactoring of the caching logic and those duplicate bits will go away. Ignore it for now and bear with me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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