You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by jo...@apache.org on 2013/06/10 17:29:27 UTC
svn commit: r1491497 - in /httpcomponents/httpasyncclient/trunk:
RELEASE_NOTES.txt
httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
Author: jonm
Date: Mon Jun 10 15:29:27 2013
New Revision: 1491497
URL: http://svn.apache.org/r1491497
Log:
HTTPCLIENT-1353: 303 redirects should be cacheable
Patch contributed by James Leigh <james at 3roundstones dot com>. This
change allows the async client to use a new CacheConfig option to allow
for this caching. Please see the following for details:
https://issues.apache.org/jira/browse/HTTPCLIENT-1353
Modified:
httpcomponents/httpasyncclient/trunk/RELEASE_NOTES.txt
httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
Modified: httpcomponents/httpasyncclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/RELEASE_NOTES.txt?rev=1491497&r1=1491496&r2=1491497&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpasyncclient/trunk/RELEASE_NOTES.txt Mon Jun 10 15:29:27 2013
@@ -10,6 +10,9 @@ Users of previous releases of HttpAsyncC
Changelog:
+* [HTTPCLIENT-1353] 303 Redirects Should be Cacheable
+ Contributed by James Leigh <james at 3roundstones dot com>
+
* Redesign of configuration and preference APIs.
Contributed by Oleg Kalnichevski <olegk at apache.org>
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java?rev=1491497&r1=1491496&r2=1491497&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java Mon Jun 10 15:29:27 2013
@@ -118,7 +118,7 @@ public class CachingHttpAsyncClient impl
this.backend = client;
this.responseCache = cache;
this.validityPolicy = new CacheValidityPolicy();
- this.responseCachingPolicy = new ResponseCachingPolicy(this.maxObjectSizeBytes, this.sharedCache, false);
+ this.responseCachingPolicy = new ResponseCachingPolicy(this.maxObjectSizeBytes, this.sharedCache, false, config.is303CachingEnabled());
this.responseGenerator = new CachedHttpResponseGenerator(this.validityPolicy);
this.cacheableRequestPolicy = new CacheableRequestPolicy();
this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy, config);