MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / isCacheable

Method isCacheable

src/main/java/org/htmlunit/Cache.java:230–234  ·  view source on GitHub ↗

Determines if the specified response can be cached. @param request the performed request @param response the received response @return true if the response can be cached

(final WebRequest request, final WebResponse response)

Source from the content-addressed store, hash-verified

228 * @return {@code true} if the response can be cached
229 */
230 protected boolean isCacheable(final WebRequest request, final WebResponse response) {
231 return HttpMethod.GET == response.getWebRequest().getHttpMethod()
232 && UrlUtils.URL_ABOUT_BLANK != request.getUrl()
233 && isCacheableContent(response);
234 }
235
236 /**
237 * <p>Perform prior validation for 'no-store' directive in Cache-Control header.</p>

Callers 1

cacheIfPossibleMethod · 0.95

Calls 4

isCacheableContentMethod · 0.95
getHttpMethodMethod · 0.80
getUrlMethod · 0.65
getWebRequestMethod · 0.45

Tested by

no test coverage detected