You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1191 lines
63 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Wed Nov 30 19:45:05 CET 2022 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CacheConfig (Apache HttpComponents Client 4.5.14 API)</title>
<meta name="date" content="2022-11-30">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CacheConfig (Apache HttpComponents Client 4.5.14 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CacheConfig.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/http/impl/client/cache/CacheConfig.html" target="_top">Frames</a></li>
<li><a href="CacheConfig.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.http.impl.client.cache</div>
<h2 title="Class CacheConfig" class="title">Class CacheConfig</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.http.impl.client.cache.CacheConfig</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">CacheConfig</span>
extends <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></pre>
<div class="block"><p>Java Beans-style configuration for a <a href="../../../../../../org/apache/http/impl/client/cache/CachingHttpClient.html" title="class in org.apache.http.impl.client.cache"><code>CachingHttpClient</code></a>. Any class
in the caching module that has configuration options should take a
<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig</code></a> argument in one of its constructors. A
<code>CacheConfig</code> instance has sane and conservative defaults, so the
easiest way to specify options is to get an instance and then set just
the options you want to modify from their defaults.</p>
<p><b>N.B.</b> This class is only for caching-specific configuration; to
configure the behavior of the rest of the client, configure the
<a href="../../../../../../org/apache/http/client/HttpClient.html" title="interface in org.apache.http.client"><code>HttpClient</code></a> used as the &quot;backend&quot;
for the <code>CachingHttpClient</code>.</p>
<p>Cache configuration can be grouped into the following categories:</p>
<p><b>Cache size.</b> If the backend storage supports these limits, you
can specify the <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxCacheEntries()"><code>maximum number of
cache entries</code></a> as well as the <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSizeBytes()"><code>maximum cacheable response body size</code></a>.</p>
<p><b>Public/private caching.</b> By default, the caching module considers
itself to be a shared (public) cache, and will not, for example, cache
responses to requests with <code>Authorization</code> headers or responses
marked with <code>Cache-Control: private</code>. If, however, the cache
is only going to be used by one logical "user" (behaving similarly to a
browser cache), then you will want to <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setSharedCache(boolean)"><code>turn off the shared cache setting</code></a>.</p>
<p><b>303 caching</b>. RFC2616 explicitly disallows caching 303 responses;
however, the HTTPbis working group says they can be cached
if explicitly indicated in the response headers and permitted by the request method.
(They also indicate that disallowing 303 caching is actually an unintended
spec error in RFC2616).
This behavior is off by default, to err on the side of a conservative
adherence to the existing standard, but you may want to
<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html#setAllow303Caching(boolean)"><code>enable it</code></a>.
<p><b>Weak ETags on PUT/DELETE If-Match requests</b>. RFC2616 explicitly
prohibits the use of weak validators in non-GET requests, however, the
HTTPbis working group says while the limitation for weak validators on ranged
requests makes sense, weak ETag validation is useful on full non-GET
requests; e.g., PUT with If-Match. This behavior is off by default, to err on
the side of a conservative adherence to the existing standard, but you may
want to <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html#setWeakETagOnPutDeleteAllowed(boolean)"><code>enable it</code></a>.
<p><b>Heuristic caching</b>. Per RFC2616, a cache may cache certain cache
entries even if no explicit cache control headers are set by the origin.
This behavior is off by default, but you may want to turn this on if you
are working with an origin that doesn't set proper headers but where you
still want to cache the responses. You will want to <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCachingEnabled(boolean)"><code>enable heuristic caching</code></a>,
then specify either a <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicDefaultLifetime()"><code>default freshness lifetime</code></a> and/or a <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCoefficient(float)"><code>fraction of the time since
the resource was last modified</code></a>. See Sections
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.2">
13.2.2</a> and <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4">
13.2.4</a> of the HTTP/1.1 RFC for more details on heuristic caching.</p>
<p><b>Background validation</b>. The cache module supports the
<code>stale-while-revalidate</code> directive of
<a href="http://tools.ietf.org/html/rfc5861">RFC5861</a>, which allows
certain cache entry revalidations to happen in the background. You may
want to tweak the settings for the <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersCore()"><code>minimum</code></a> and <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersMax()"><code>maximum</code></a> number of background
worker threads, as well as the <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkerIdleLifetimeSecs()"><code>maximum time they
can be idle before being reclaimed</code></a>. You can also control the <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getRevalidationQueueSize()"><code>size of the queue</code></a> used for
revalidations when there aren't enough workers to keep up with demand.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache">CacheConfig.Builder</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT">DEFAULT</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_303_CACHING_ENABLED">DEFAULT_303_CACHING_ENABLED</a></strong></code>
<div class="block">Default setting for 303 caching</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS">DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</a></strong></code>
<div class="block">Default maximum idle lifetime for a background revalidation thread
before it gets reclaimed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKERS_CORE">DEFAULT_ASYNCHRONOUS_WORKERS_CORE</a></strong></code>
<div class="block">Default minimum number of worker threads to allow for background
revalidations resulting from the stale-while-revalidate directive.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKERS_MAX">DEFAULT_ASYNCHRONOUS_WORKERS_MAX</a></strong></code>
<div class="block">Default number of worker threads to allow for background revalidations
resulting from the stale-while-revalidate directive.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_CACHING_ENABLED">DEFAULT_HEURISTIC_CACHING_ENABLED</a></strong></code>
<div class="block">Default setting for heuristic caching</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_COEFFICIENT">DEFAULT_HEURISTIC_COEFFICIENT</a></strong></code>
<div class="block">Default coefficient used to heuristically determine freshness
lifetime from the Last-Modified time of a cache entry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_LIFETIME">DEFAULT_HEURISTIC_LIFETIME</a></strong></code>
<div class="block">Default lifetime in seconds to be assumed when we cannot calculate
freshness heuristically.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_CACHE_ENTRIES">DEFAULT_MAX_CACHE_ENTRIES</a></strong></code>
<div class="block">Default setting for the maximum number of cache entries
that will be retained.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_OBJECT_SIZE_BYTES">DEFAULT_MAX_OBJECT_SIZE_BYTES</a></strong></code>
<div class="block">Default setting for the maximum object size that will be
cached, in bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_UPDATE_RETRIES">DEFAULT_MAX_UPDATE_RETRIES</a></strong></code>
<div class="block">Default setting for the number of retries on a failed
cache update</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_REVALIDATION_QUEUE_SIZE">DEFAULT_REVALIDATION_QUEUE_SIZE</a></strong></code>
<div class="block">Default maximum queue length for background revalidation requests.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED">DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED</a></strong></code>
<div class="block">Default setting to allow weak tags on PUT/DELETE methods</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#CacheConfig()">CacheConfig</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#clone()">clone</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache">CacheConfig.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#copy(org.apache.http.impl.client.cache.CacheConfig)">copy</a></strong>(<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a>&nbsp;config)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache">CacheConfig.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#custom()">custom</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkerIdleLifetimeSecs()">getAsynchronousWorkerIdleLifetimeSecs</a></strong>()</code>
<div class="block">Returns the current maximum idle lifetime in seconds for a
background revalidation worker thread.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersCore()">getAsynchronousWorkersCore</a></strong>()</code>
<div class="block">Returns the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersMax()">getAsynchronousWorkersMax</a></strong>()</code>
<div class="block">Returns the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicCoefficient()">getHeuristicCoefficient</a></strong>()</code>
<div class="block">Returns lifetime coefficient used in heuristic freshness caching.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicDefaultLifetime()">getHeuristicDefaultLifetime</a></strong>()</code>
<div class="block">Get the default lifetime to be used if heuristic freshness calculation is
not possible.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxCacheEntries()">getMaxCacheEntries</a></strong>()</code>
<div class="block">Returns the maximum number of cache entries the cache will retain.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()">getMaxObjectSize</a></strong>()</code>
<div class="block">Returns the current maximum response body size that will be cached.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSizeBytes()">getMaxObjectSizeBytes</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.2) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()"><code>getMaxObjectSize()</code></a></i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxUpdateRetries()">getMaxUpdateRetries</a></strong>()</code>
<div class="block">Returns the number of times to retry a cache update on failure</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getRevalidationQueueSize()">getRevalidationQueueSize</a></strong>()</code>
<div class="block">Returns the current maximum queue size for background revalidations.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#is303CachingEnabled()">is303CachingEnabled</a></strong>()</code>
<div class="block">Returns whether 303 caching is enabled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isHeuristicCachingEnabled()">isHeuristicCachingEnabled</a></strong>()</code>
<div class="block">Returns whether heuristic caching is enabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isNeverCacheHTTP10ResponsesWithQuery()">isNeverCacheHTTP10ResponsesWithQuery</a></strong>()</code>
<div class="block">Returns whether the cache will never cache HTTP 1.0 responses with a query string or not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isSharedCache()">isSharedCache</a></strong>()</code>
<div class="block">Returns whether the cache will behave as a shared cache or not.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isWeakETagOnPutDeleteAllowed()">isWeakETagOnPutDeleteAllowed</a></strong>()</code>
<div class="block">Returns whether weak etags is allowed with PUT/DELETE methods.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkerIdleLifetimeSecs(int)">setAsynchronousWorkerIdleLifetimeSecs</a></strong>(int&nbsp;secs)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersCore(int)">setAsynchronousWorkersCore</a></strong>(int&nbsp;min)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersMax(int)">setAsynchronousWorkersMax</a></strong>(int&nbsp;max)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCachingEnabled(boolean)">setHeuristicCachingEnabled</a></strong>(boolean&nbsp;heuristicCachingEnabled)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCoefficient(float)">setHeuristicCoefficient</a></strong>(float&nbsp;heuristicCoefficient)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicDefaultLifetime(long)">setHeuristicDefaultLifetime</a></strong>(long&nbsp;heuristicDefaultLifetimeSecs)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxCacheEntries(int)">setMaxCacheEntries</a></strong>(int&nbsp;maxCacheEntries)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSize(long)">setMaxObjectSize</a></strong>(long&nbsp;maxObjectSize)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSizeBytes(int)">setMaxObjectSizeBytes</a></strong>(int&nbsp;maxObjectSizeBytes)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.2) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxUpdateRetries(int)">setMaxUpdateRetries</a></strong>(int&nbsp;maxUpdateRetries)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setRevalidationQueueSize(int)">setRevalidationQueueSize</a></strong>(int&nbsp;size)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setSharedCache(boolean)">setSharedCache</a></strong>(boolean&nbsp;isSharedCache)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#toString()">toString</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_MAX_OBJECT_SIZE_BYTES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_OBJECT_SIZE_BYTES</h4>
<pre>public static final&nbsp;int DEFAULT_MAX_OBJECT_SIZE_BYTES</pre>
<div class="block">Default setting for the maximum object size that will be
cached, in bytes.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_MAX_CACHE_ENTRIES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_CACHE_ENTRIES</h4>
<pre>public static final&nbsp;int DEFAULT_MAX_CACHE_ENTRIES</pre>
<div class="block">Default setting for the maximum number of cache entries
that will be retained.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_CACHE_ENTRIES">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_MAX_UPDATE_RETRIES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_UPDATE_RETRIES</h4>
<pre>public static final&nbsp;int DEFAULT_MAX_UPDATE_RETRIES</pre>
<div class="block">Default setting for the number of retries on a failed
cache update</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_UPDATE_RETRIES">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_303_CACHING_ENABLED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_303_CACHING_ENABLED</h4>
<pre>public static final&nbsp;boolean DEFAULT_303_CACHING_ENABLED</pre>
<div class="block">Default setting for 303 caching</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_303_CACHING_ENABLED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED</h4>
<pre>public static final&nbsp;boolean DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED</pre>
<div class="block">Default setting to allow weak tags on PUT/DELETE methods</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_WEAK_ETAG_ON_PUTDELETE_ALLOWED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_HEURISTIC_CACHING_ENABLED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_HEURISTIC_CACHING_ENABLED</h4>
<pre>public static final&nbsp;boolean DEFAULT_HEURISTIC_CACHING_ENABLED</pre>
<div class="block">Default setting for heuristic caching</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_CACHING_ENABLED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_HEURISTIC_COEFFICIENT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_HEURISTIC_COEFFICIENT</h4>
<pre>public static final&nbsp;float DEFAULT_HEURISTIC_COEFFICIENT</pre>
<div class="block">Default coefficient used to heuristically determine freshness
lifetime from the Last-Modified time of a cache entry.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_COEFFICIENT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_HEURISTIC_LIFETIME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_HEURISTIC_LIFETIME</h4>
<pre>public static final&nbsp;long DEFAULT_HEURISTIC_LIFETIME</pre>
<div class="block">Default lifetime in seconds to be assumed when we cannot calculate
freshness heuristically.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_LIFETIME">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_ASYNCHRONOUS_WORKERS_MAX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ASYNCHRONOUS_WORKERS_MAX</h4>
<pre>public static final&nbsp;int DEFAULT_ASYNCHRONOUS_WORKERS_MAX</pre>
<div class="block">Default number of worker threads to allow for background revalidations
resulting from the stale-while-revalidate directive.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKERS_MAX">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_ASYNCHRONOUS_WORKERS_CORE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ASYNCHRONOUS_WORKERS_CORE</h4>
<pre>public static final&nbsp;int DEFAULT_ASYNCHRONOUS_WORKERS_CORE</pre>
<div class="block">Default minimum number of worker threads to allow for background
revalidations resulting from the stale-while-revalidate directive.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKERS_CORE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</h4>
<pre>public static final&nbsp;int DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</pre>
<div class="block">Default maximum idle lifetime for a background revalidation thread
before it gets reclaimed.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_REVALIDATION_QUEUE_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_REVALIDATION_QUEUE_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_REVALIDATION_QUEUE_SIZE</pre>
<div class="block">Default maximum queue length for background revalidation requests.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_REVALIDATION_QUEUE_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT</h4>
<pre>public static final&nbsp;<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a> DEFAULT</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="CacheConfig()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CacheConfig</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;CacheConfig()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getMaxObjectSizeBytes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxObjectSizeBytes</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;int&nbsp;getMaxObjectSizeBytes()</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.2) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()"><code>getMaxObjectSize()</code></a></i></div>
<div class="block">Returns the current maximum response body size that will be cached.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>size in bytes</dd></dl>
</li>
</ul>
<a name="setMaxObjectSizeBytes(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxObjectSizeBytes</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setMaxObjectSizeBytes(int&nbsp;maxObjectSizeBytes)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.2) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Specifies the maximum response body size that will be eligible for caching.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>maxObjectSizeBytes</code> - size in bytes</dd></dl>
</li>
</ul>
<a name="getMaxObjectSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxObjectSize</h4>
<pre>public&nbsp;long&nbsp;getMaxObjectSize()</pre>
<div class="block">Returns the current maximum response body size that will be cached.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>size in bytes</dd><dt><span class="strong">Since:</span></dt>
<dd>4.2</dd></dl>
</li>
</ul>
<a name="setMaxObjectSize(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxObjectSize</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setMaxObjectSize(long&nbsp;maxObjectSize)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Specifies the maximum response body size that will be eligible for caching.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>maxObjectSize</code> - size in bytes</dd><dt><span class="strong">Since:</span></dt>
<dd>4.2</dd></dl>
</li>
</ul>
<a name="isNeverCacheHTTP10ResponsesWithQuery()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNeverCacheHTTP10ResponsesWithQuery</h4>
<pre>public&nbsp;boolean&nbsp;isNeverCacheHTTP10ResponsesWithQuery()</pre>
<div class="block">Returns whether the cache will never cache HTTP 1.0 responses with a query string or not.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> to not cache query string responses, <code>false</code> to cache if explicit cache headers are
found</dd></dl>
</li>
</ul>
<a name="getMaxCacheEntries()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxCacheEntries</h4>
<pre>public&nbsp;int&nbsp;getMaxCacheEntries()</pre>
<div class="block">Returns the maximum number of cache entries the cache will retain.</div>
</li>
</ul>
<a name="setMaxCacheEntries(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxCacheEntries</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setMaxCacheEntries(int&nbsp;maxCacheEntries)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the maximum number of cache entries the cache will retain.</div>
</li>
</ul>
<a name="getMaxUpdateRetries()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxUpdateRetries</h4>
<pre>public&nbsp;int&nbsp;getMaxUpdateRetries()</pre>
<div class="block">Returns the number of times to retry a cache update on failure</div>
</li>
</ul>
<a name="setMaxUpdateRetries(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxUpdateRetries</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setMaxUpdateRetries(int&nbsp;maxUpdateRetries)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the number of times to retry a cache update on failure</div>
</li>
</ul>
<a name="is303CachingEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>is303CachingEnabled</h4>
<pre>public&nbsp;boolean&nbsp;is303CachingEnabled()</pre>
<div class="block">Returns whether 303 caching is enabled.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if it is enabled.</dd></dl>
</li>
</ul>
<a name="isWeakETagOnPutDeleteAllowed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWeakETagOnPutDeleteAllowed</h4>
<pre>public&nbsp;boolean&nbsp;isWeakETagOnPutDeleteAllowed()</pre>
<div class="block">Returns whether weak etags is allowed with PUT/DELETE methods.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if it is allowed.</dd></dl>
</li>
</ul>
<a name="isHeuristicCachingEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isHeuristicCachingEnabled</h4>
<pre>public&nbsp;boolean&nbsp;isHeuristicCachingEnabled()</pre>
<div class="block">Returns whether heuristic caching is enabled.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if it is enabled.</dd></dl>
</li>
</ul>
<a name="setHeuristicCachingEnabled(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHeuristicCachingEnabled</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setHeuristicCachingEnabled(boolean&nbsp;heuristicCachingEnabled)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Enables or disables heuristic caching.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>heuristicCachingEnabled</code> - should be <code>true</code> to
permit heuristic caching, <code>false</code> to disable it.</dd></dl>
</li>
</ul>
<a name="getHeuristicCoefficient()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeuristicCoefficient</h4>
<pre>public&nbsp;float&nbsp;getHeuristicCoefficient()</pre>
<div class="block">Returns lifetime coefficient used in heuristic freshness caching.</div>
</li>
</ul>
<a name="setHeuristicCoefficient(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHeuristicCoefficient</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setHeuristicCoefficient(float&nbsp;heuristicCoefficient)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets coefficient to be used in heuristic freshness caching. This is
interpreted as the fraction of the time between the <code>Last-Modified</code>
and <code>Date</code> headers of a cached response during which the cached
response will be considered heuristically fresh.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>heuristicCoefficient</code> - should be between <code>0.0</code> and
<code>1.0</code>.</dd></dl>
</li>
</ul>
<a name="getHeuristicDefaultLifetime()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeuristicDefaultLifetime</h4>
<pre>public&nbsp;long&nbsp;getHeuristicDefaultLifetime()</pre>
<div class="block">Get the default lifetime to be used if heuristic freshness calculation is
not possible.</div>
</li>
</ul>
<a name="setHeuristicDefaultLifetime(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setHeuristicDefaultLifetime</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setHeuristicDefaultLifetime(long&nbsp;heuristicDefaultLifetimeSecs)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets default lifetime in seconds to be used if heuristic freshness
calculation is not possible. Explicit cache control directives on
either the request or origin response will override this, as will
the heuristic <code>Last-Modified</code> freshness calculation if it is
available.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>heuristicDefaultLifetimeSecs</code> - is the number of seconds to
consider a cache-eligible response fresh in the absence of other
information. Set this to <code>0</code> to disable this style of
heuristic caching.</dd></dl>
</li>
</ul>
<a name="isSharedCache()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSharedCache</h4>
<pre>public&nbsp;boolean&nbsp;isSharedCache()</pre>
<div class="block">Returns whether the cache will behave as a shared cache or not.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> for a shared cache, <code>false</code> for a non-
shared (private) cache</dd></dl>
</li>
</ul>
<a name="setSharedCache(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSharedCache</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setSharedCache(boolean&nbsp;isSharedCache)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets whether the cache should behave as a shared cache or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>isSharedCache</code> - true to behave as a shared cache, false to
behave as a non-shared (private) cache. To have the cache
behave like a browser cache, you want to set this to <code>false</code>.</dd></dl>
</li>
</ul>
<a name="getAsynchronousWorkersMax()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAsynchronousWorkersMax</h4>
<pre>public&nbsp;int&nbsp;getAsynchronousWorkersMax()</pre>
<div class="block">Returns the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive. A
value of 0 means background revalidations are disabled.</div>
</li>
</ul>
<a name="setAsynchronousWorkersMax(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAsynchronousWorkersMax</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setAsynchronousWorkersMax(int&nbsp;max)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>max</code> - number of threads; a value of 0 disables background
revalidations.</dd></dl>
</li>
</ul>
<a name="getAsynchronousWorkersCore()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAsynchronousWorkersCore</h4>
<pre>public&nbsp;int&nbsp;getAsynchronousWorkersCore()</pre>
<div class="block">Returns the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.</div>
</li>
</ul>
<a name="setAsynchronousWorkersCore(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAsynchronousWorkersCore</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setAsynchronousWorkersCore(int&nbsp;min)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>min</code> - should be greater than zero and less than or equal
to <code>getAsynchronousWorkersMax()</code></dd></dl>
</li>
</ul>
<a name="getAsynchronousWorkerIdleLifetimeSecs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAsynchronousWorkerIdleLifetimeSecs</h4>
<pre>public&nbsp;int&nbsp;getAsynchronousWorkerIdleLifetimeSecs()</pre>
<div class="block">Returns the current maximum idle lifetime in seconds for a
background revalidation worker thread. If a worker thread is idle
for this long, and there are more than the core number of worker
threads alive, the worker will be reclaimed.</div>
</li>
</ul>
<a name="setAsynchronousWorkerIdleLifetimeSecs(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAsynchronousWorkerIdleLifetimeSecs</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setAsynchronousWorkerIdleLifetimeSecs(int&nbsp;secs)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the current maximum idle lifetime in seconds for a
background revalidation worker thread. If a worker thread is idle
for this long, and there are more than the core number of worker
threads alive, the worker will be reclaimed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>secs</code> - idle lifetime in seconds</dd></dl>
</li>
</ul>
<a name="getRevalidationQueueSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRevalidationQueueSize</h4>
<pre>public&nbsp;int&nbsp;getRevalidationQueueSize()</pre>
<div class="block">Returns the current maximum queue size for background revalidations.</div>
</li>
</ul>
<a name="setRevalidationQueueSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRevalidationQueueSize</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setRevalidationQueueSize(int&nbsp;size)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>(4.3) use <a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><code>CacheConfig.Builder</code></a>.</i></div>
<div class="block">Sets the current maximum queue size for background revalidations.</div>
</li>
</ul>
<a name="clone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>protected&nbsp;<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a>&nbsp;clone()
throws <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/CloneNotSupportedException.html?is-external=true" title="class or interface in java.lang">CloneNotSupportedException</a></pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/CloneNotSupportedException.html?is-external=true" title="class or interface in java.lang">CloneNotSupportedException</a></code></dd></dl>
</li>
</ul>
<a name="custom()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>custom</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache">CacheConfig.Builder</a>&nbsp;custom()</pre>
</li>
</ul>
<a name="copy(org.apache.http.impl.client.cache.CacheConfig)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache">CacheConfig.Builder</a>&nbsp;copy(<a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html" title="class in org.apache.http.impl.client.cache">CacheConfig</a>&nbsp;config)</pre>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CacheConfig.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/http/impl/client/cache/CacheConfig.Builder.html" title="class in org.apache.http.impl.client.cache"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/http/impl/client/cache/CacheConfig.html" target="_top">Frames</a></li>
<li><a href="CacheConfig.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1999&#x2013;2022 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>