hc.setHttpRequestRetryHandler(new LMFHttpRequestRetryHandler());
hc.removeRequestInterceptorByClass(org.apache.http.protocol.RequestUserAgent.class);
hc.addRequestInterceptor(new LMFRequestUserAgent(userAgentString));
if (configurationService.getBooleanConfiguration("core.http.client_cache_enable", true)) {
CacheConfig cacheConfig = new CacheConfig();
// FIXME: Hardcoded constants - is this useful?
cacheConfig.setMaxCacheEntries(1000);
cacheConfig.setMaxObjectSize(81920);
final HttpCacheStorage cacheStore = new EhcacheHttpCacheStorage(ehcache.get(), cacheConfig);
this.httpClient = new MonitoredHttpClient(new CachingHttpClient(hc, cacheStore, cacheConfig));
} else {