/** * Revalidate the cache entry and return if the operation was successful. * Success means a connection to the server was established and replay did * not indicate a server error. * @return <code>true</code> if the cache entry was successfully validated; * otherwise <code>false</code> */ protected boolean revalidateCacheEntry() { try { final CloseableHttpResponse httpResponse = cachingExec.revalidateCacheEntry(route, request, context, execAware, cacheEntry); try { final int statusCode = httpResponse.getStatusLine().getStatusCode(); return isNotServerError(statusCode) && isNotStale(httpResponse); } finally { httpResponse.close(); } } catch (final IOException ioe) { log.debug("Asynchronous revalidation failed due to I/O error", ioe); return false; } catch (final HttpException pe) { log.error("HTTP protocol exception during asynchronous revalidation", pe); return false; } catch (final RuntimeException re) { log.error("RuntimeException thrown during asynchronous revalidation: " + re); return false; } }