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 {
this.httpClient = new MonitoredHttpClient(hc);
}