desiderantes commented on code in PR #850:
URL: 
https://github.com/apache/httpcomponents-client/pull/850#discussion_r3590080660


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java:
##########
@@ -302,7 +302,7 @@ public void completed(final CacheMatch result) {
                 final CacheHit root = result != null ? result.root : null;
                 if (hit == null) {
                     if (requestCollapsingEnabled && root == null && 
!requestCacheControl.isOnlyIfCached()) {
-                        final String cacheKey = 
CacheKeyGenerator.INSTANCE.generateKey(target, cacheRequest);
+                        final String cacheKey = 
CacheKeyGenerator.INSTANCE.generateKey(target, cacheRequest, 
SimpleHttpRequest::getBodyText);

Review Comment:
   hmm... it is also possible that subclasses of Request might have a certain 
representation for certain content types (like a sorted object/array for json, 
or ordered form fields, etc), which might affect the caching as different 
bodies should be cached because they converge to the same canonical 
representation



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to