Skip to content

Commit

Permalink
DRILL-8495: HTTP Caching Not Saving Pages (apache#2912)
Browse files Browse the repository at this point in the history
Co-authored-by: Charles Givre <[email protected]>
  • Loading branch information
cgivre and Charles Givre authored May 7, 2024
1 parent b4ecce7 commit 3a1e558
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ public static String getRequestAndStringResponse(String url) {

/**
*
* @param url
* @param url The input URL
* @return an input stream which the caller is responsible for closing.
*/
public static InputStream getRequestAndStreamResponse(String url) {
Expand All @@ -1029,9 +1029,9 @@ public static InputStream getRequestAndStreamResponse(String url) {

/**
*
* @param url
* @param url The input URL
* @return response body which the caller is responsible for closing.
* @throws IOException
* @throws IOException If anything goes wrong, throws an IOException
*/
public static ResponseBody makeSimpleGetRequest(String url) throws IOException {
Request.Builder requestBuilder = new Request.Builder()
Expand All @@ -1047,14 +1047,9 @@ public static ResponseBody makeSimpleGetRequest(String url) throws IOException {

@Override
public void close() {
Cache cache;
try {
cache = client.cache();
if (cache != null) {
cache.close();
}
client.connectionPool().evictAll();
} catch (IOException e) {
} catch (Exception e) {
logger.warn("Error closing cache. {}", e.getMessage());
}
}
Expand Down

0 comments on commit 3a1e558

Please sign in to comment.