blob: e168d062d5a99b0ef9b626d7838b8687ae544cb8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Oct 21 11:03:15 GMT+01:00 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
CacheConfig (HttpComponents Client 4.2.2 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.http.impl.client.cache.CacheConfig class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CacheConfig (HttpComponents Client 4.2.2 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheConfig.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/http/impl/client/cache/CachingHttpClient.html" title="class in org.apache.http.impl.client.cache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/http/impl/client/cache/CacheConfig.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CacheConfig.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.http.impl.client.cache</FONT>
<BR>
Class CacheConfig</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.impl.client.cache.CacheConfig</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>CacheConfig</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
<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#setMaxCacheEntries(int)"><CODE>maximum number of
cache entries</CODE></A> as well as the <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSizeBytes(int)"><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>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#setHeuristicDefaultLifetime(long)"><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#setAsynchronousWorkersCore(int)"><CODE>minimum</CODE></A> and <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersMax(int)"><CODE>maximum</CODE></A> number of background
worker threads, as well as the <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkerIdleLifetimeSecs(int)"><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#setRevalidationQueueSize(int)"><CODE>size of the queue</CODE></A> used for
revalidations when there aren't enough workers to keep up with demand.</b>
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS">DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default maximum idle lifetime for a background revalidation thread
before it gets reclaimed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKERS_CORE">DEFAULT_ASYNCHRONOUS_WORKERS_CORE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default minimum number of worker threads to allow for background
revalidations resulting from the stale-while-revalidate directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_ASYNCHRONOUS_WORKERS_MAX">DEFAULT_ASYNCHRONOUS_WORKERS_MAX</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default number of worker threads to allow for background revalidations
resulting from the stale-while-revalidate directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_CACHING_ENABLED">DEFAULT_HEURISTIC_CACHING_ENABLED</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default setting for heuristic caching</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_COEFFICIENT">DEFAULT_HEURISTIC_COEFFICIENT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default coefficient used to heuristically determine freshness
lifetime from the Last-Modified time of a cache entry.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_HEURISTIC_LIFETIME">DEFAULT_HEURISTIC_LIFETIME</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default lifetime in seconds to be assumed when we cannot calculate
freshness heuristically.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_CACHE_ENTRIES">DEFAULT_MAX_CACHE_ENTRIES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default setting for the maximum number of cache entries
that will be retained.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_OBJECT_SIZE_BYTES">DEFAULT_MAX_OBJECT_SIZE_BYTES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default setting for the maximum object size that will be
cached, in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_MAX_UPDATE_RETRIES">DEFAULT_MAX_UPDATE_RETRIES</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default setting for the number of retries on a failed
cache update</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#DEFAULT_REVALIDATION_QUEUE_SIZE">DEFAULT_REVALIDATION_QUEUE_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default maximum queue length for background revalidation requests.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#CacheConfig()">CacheConfig</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkerIdleLifetimeSecs()">getAsynchronousWorkerIdleLifetimeSecs</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current maximum idle lifetime in seconds for a
background revalidation worker thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersCore()">getAsynchronousWorkersCore</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersMax()">getAsynchronousWorkersMax</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicCoefficient()">getHeuristicCoefficient</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns lifetime coefficient used in heuristic freshness caching.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicDefaultLifetime()">getHeuristicDefaultLifetime</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default lifetime to be used if heuristic freshness calculation is
not possible.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxCacheEntries()">getMaxCacheEntries</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum number of cache entries the cache will retain.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()">getMaxObjectSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current maximum response body size that will be cached.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSizeBytes()">getMaxObjectSizeBytes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()"><CODE>getMaxObjectSize()</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxUpdateRetries()">getMaxUpdateRetries</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of times to retry a cache update on failure</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getRevalidationQueueSize()">getRevalidationQueueSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current maximum queue size for background revalidations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isHeuristicCachingEnabled()">isHeuristicCachingEnabled</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether heuristic caching is enabled.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isSharedCache()">isSharedCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the cache will behave as a shared cache or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkerIdleLifetimeSecs(int)">setAsynchronousWorkerIdleLifetimeSecs</A></B>(int&nbsp;secs)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current maximum idle lifetime in seconds for a
background revalidation worker thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersCore(int)">setAsynchronousWorkersCore</A></B>(int&nbsp;min)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersMax(int)">setAsynchronousWorkersMax</A></B>(int&nbsp;max)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCachingEnabled(boolean)">setHeuristicCachingEnabled</A></B>(boolean&nbsp;heuristicCachingEnabled)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enables or disables heuristic caching.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCoefficient(float)">setHeuristicCoefficient</A></B>(float&nbsp;heuristicCoefficient)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets coefficient to be used in heuristic freshness caching.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicDefaultLifetime(long)">setHeuristicDefaultLifetime</A></B>(long&nbsp;heuristicDefaultLifetimeSecs)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets default lifetime in seconds to be used if heuristic freshness
calculation is not possible.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxCacheEntries(int)">setMaxCacheEntries</A></B>(int&nbsp;maxCacheEntries)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum number of cache entries the cache will retain.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSize(long)">setMaxObjectSize</A></B>(long&nbsp;maxObjectSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the maximum response body size that will be eligible for caching.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSizeBytes(int)">setMaxObjectSizeBytes</A></B>(int&nbsp;maxObjectSizeBytes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSize(long)"><CODE>setMaxObjectSize(long)</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxUpdateRetries(int)">setMaxUpdateRetries</A></B>(int&nbsp;maxUpdateRetries)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the number of times to retry a cache update on failure</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setRevalidationQueueSize(int)">setRevalidationQueueSize</A></B>(int&nbsp;size)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current maximum queue size for background revalidations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setSharedCache(boolean)">setSharedCache</A></B>(boolean&nbsp;isSharedCache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether the cache should behave as a shared cache or not.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DEFAULT_MAX_OBJECT_SIZE_BYTES"><!-- --></A><H3>
DEFAULT_MAX_OBJECT_SIZE_BYTES</H3>
<PRE>
public static final int <B>DEFAULT_MAX_OBJECT_SIZE_BYTES</B></PRE>
<DL>
<DD>Default setting for the maximum object size that will be
cached, in bytes.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_OBJECT_SIZE_BYTES">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_MAX_CACHE_ENTRIES"><!-- --></A><H3>
DEFAULT_MAX_CACHE_ENTRIES</H3>
<PRE>
public static final int <B>DEFAULT_MAX_CACHE_ENTRIES</B></PRE>
<DL>
<DD>Default setting for the maximum number of cache entries
that will be retained.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_CACHE_ENTRIES">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_MAX_UPDATE_RETRIES"><!-- --></A><H3>
DEFAULT_MAX_UPDATE_RETRIES</H3>
<PRE>
public static final int <B>DEFAULT_MAX_UPDATE_RETRIES</B></PRE>
<DL>
<DD>Default setting for the number of retries on a failed
cache update
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_MAX_UPDATE_RETRIES">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_HEURISTIC_CACHING_ENABLED"><!-- --></A><H3>
DEFAULT_HEURISTIC_CACHING_ENABLED</H3>
<PRE>
public static final boolean <B>DEFAULT_HEURISTIC_CACHING_ENABLED</B></PRE>
<DL>
<DD>Default setting for heuristic caching
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_CACHING_ENABLED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_HEURISTIC_COEFFICIENT"><!-- --></A><H3>
DEFAULT_HEURISTIC_COEFFICIENT</H3>
<PRE>
public static final float <B>DEFAULT_HEURISTIC_COEFFICIENT</B></PRE>
<DL>
<DD>Default coefficient used to heuristically determine freshness
lifetime from the Last-Modified time of a cache entry.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_COEFFICIENT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_HEURISTIC_LIFETIME"><!-- --></A><H3>
DEFAULT_HEURISTIC_LIFETIME</H3>
<PRE>
public static final long <B>DEFAULT_HEURISTIC_LIFETIME</B></PRE>
<DL>
<DD>Default lifetime in seconds to be assumed when we cannot calculate
freshness heuristically.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_HEURISTIC_LIFETIME">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_ASYNCHRONOUS_WORKERS_MAX"><!-- --></A><H3>
DEFAULT_ASYNCHRONOUS_WORKERS_MAX</H3>
<PRE>
public static final int <B>DEFAULT_ASYNCHRONOUS_WORKERS_MAX</B></PRE>
<DL>
<DD>Default number of worker threads to allow for background revalidations
resulting from the stale-while-revalidate directive.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKERS_MAX">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_ASYNCHRONOUS_WORKERS_CORE"><!-- --></A><H3>
DEFAULT_ASYNCHRONOUS_WORKERS_CORE</H3>
<PRE>
public static final int <B>DEFAULT_ASYNCHRONOUS_WORKERS_CORE</B></PRE>
<DL>
<DD>Default minimum number of worker threads to allow for background
revalidations resulting from the stale-while-revalidate directive.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKERS_CORE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS"><!-- --></A><H3>
DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</H3>
<PRE>
public static final int <B>DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS</B></PRE>
<DL>
<DD>Default maximum idle lifetime for a background revalidation thread
before it gets reclaimed.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_REVALIDATION_QUEUE_SIZE"><!-- --></A><H3>
DEFAULT_REVALIDATION_QUEUE_SIZE</H3>
<PRE>
public static final int <B>DEFAULT_REVALIDATION_QUEUE_SIZE</B></PRE>
<DL>
<DD>Default maximum queue length for background revalidation requests.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.http.impl.client.cache.CacheConfig.DEFAULT_REVALIDATION_QUEUE_SIZE">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="CacheConfig()"><!-- --></A><H3>
CacheConfig</H3>
<PRE>
public <B>CacheConfig</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getMaxObjectSizeBytes()"><!-- --></A><H3>
getMaxObjectSizeBytes</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A>
</FONT>public int <B>getMaxObjectSizeBytes</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()"><CODE>getMaxObjectSize()</CODE></A></I>
<P>
<DD>Returns the current maximum response body size that will be cached.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>size in bytes</DL>
</DD>
</DL>
<HR>
<A NAME="setMaxObjectSizeBytes(int)"><!-- --></A><H3>
setMaxObjectSizeBytes</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A>
</FONT>public void <B>setMaxObjectSizeBytes</B>(int&nbsp;maxObjectSizeBytes)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>(4.2) use <A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSize(long)"><CODE>setMaxObjectSize(long)</CODE></A></I>
<P>
<DD>Specifies the maximum response body size that will be eligible for caching.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>maxObjectSizeBytes</CODE> - size in bytes</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxObjectSize()"><!-- --></A><H3>
getMaxObjectSize</H3>
<PRE>
public long <B>getMaxObjectSize</B>()</PRE>
<DL>
<DD>Returns the current maximum response body size that will be cached.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>size in bytes<DT><B>Since:</B></DT>
<DD>4.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMaxObjectSize(long)"><!-- --></A><H3>
setMaxObjectSize</H3>
<PRE>
public void <B>setMaxObjectSize</B>(long&nbsp;maxObjectSize)</PRE>
<DL>
<DD>Specifies the maximum response body size that will be eligible for caching.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>maxObjectSize</CODE> - size in bytes<DT><B>Since:</B></DT>
<DD>4.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="isSharedCache()"><!-- --></A><H3>
isSharedCache</H3>
<PRE>
public boolean <B>isSharedCache</B>()</PRE>
<DL>
<DD>Returns whether the cache will behave as a shared cache or not.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> for a shared cache, <code>false</code> for a non-
shared (private) cache</DL>
</DD>
</DL>
<HR>
<A NAME="setSharedCache(boolean)"><!-- --></A><H3>
setSharedCache</H3>
<PRE>
public void <B>setSharedCache</B>(boolean&nbsp;isSharedCache)</PRE>
<DL>
<DD>Sets whether the cache should behave as a shared cache or not.
<P>
<DD><DL>
<DT><B>Parameters:</B><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>.</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxCacheEntries()"><!-- --></A><H3>
getMaxCacheEntries</H3>
<PRE>
public int <B>getMaxCacheEntries</B>()</PRE>
<DL>
<DD>Returns the maximum number of cache entries the cache will retain.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMaxCacheEntries(int)"><!-- --></A><H3>
setMaxCacheEntries</H3>
<PRE>
public void <B>setMaxCacheEntries</B>(int&nbsp;maxCacheEntries)</PRE>
<DL>
<DD>Sets the maximum number of cache entries the cache will retain.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxUpdateRetries()"><!-- --></A><H3>
getMaxUpdateRetries</H3>
<PRE>
public int <B>getMaxUpdateRetries</B>()</PRE>
<DL>
<DD>Returns the number of times to retry a cache update on failure
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMaxUpdateRetries(int)"><!-- --></A><H3>
setMaxUpdateRetries</H3>
<PRE>
public void <B>setMaxUpdateRetries</B>(int&nbsp;maxUpdateRetries)</PRE>
<DL>
<DD>Sets the number of times to retry a cache update on failure
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isHeuristicCachingEnabled()"><!-- --></A><H3>
isHeuristicCachingEnabled</H3>
<PRE>
public boolean <B>isHeuristicCachingEnabled</B>()</PRE>
<DL>
<DD>Returns whether heuristic caching is enabled.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if it is enabled.</DL>
</DD>
</DL>
<HR>
<A NAME="setHeuristicCachingEnabled(boolean)"><!-- --></A><H3>
setHeuristicCachingEnabled</H3>
<PRE>
public void <B>setHeuristicCachingEnabled</B>(boolean&nbsp;heuristicCachingEnabled)</PRE>
<DL>
<DD>Enables or disables heuristic caching.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>heuristicCachingEnabled</CODE> - should be <code>true</code> to
permit heuristic caching, <code>false</code> to enable it.</DL>
</DD>
</DL>
<HR>
<A NAME="getHeuristicCoefficient()"><!-- --></A><H3>
getHeuristicCoefficient</H3>
<PRE>
public float <B>getHeuristicCoefficient</B>()</PRE>
<DL>
<DD>Returns lifetime coefficient used in heuristic freshness caching.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setHeuristicCoefficient(float)"><!-- --></A><H3>
setHeuristicCoefficient</H3>
<PRE>
public void <B>setHeuristicCoefficient</B>(float&nbsp;heuristicCoefficient)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>heuristicCoefficient</CODE> - should be between <code>0.0</code> and
<code>1.0</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getHeuristicDefaultLifetime()"><!-- --></A><H3>
getHeuristicDefaultLifetime</H3>
<PRE>
public long <B>getHeuristicDefaultLifetime</B>()</PRE>
<DL>
<DD>Get the default lifetime to be used if heuristic freshness calculation is
not possible.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setHeuristicDefaultLifetime(long)"><!-- --></A><H3>
setHeuristicDefaultLifetime</H3>
<PRE>
public void <B>setHeuristicDefaultLifetime</B>(long&nbsp;heuristicDefaultLifetimeSecs)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><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.</DL>
</DD>
</DL>
<HR>
<A NAME="getAsynchronousWorkersMax()"><!-- --></A><H3>
getAsynchronousWorkersMax</H3>
<PRE>
public int <B>getAsynchronousWorkersMax</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAsynchronousWorkersMax(int)"><!-- --></A><H3>
setAsynchronousWorkersMax</H3>
<PRE>
public void <B>setAsynchronousWorkersMax</B>(int&nbsp;max)</PRE>
<DL>
<DD>Sets the maximum number of threads to allow for background
revalidations due to the <code>stale-while-revalidate</code> directive.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>max</CODE> - number of threads; a value of 0 disables background
revalidations.</DL>
</DD>
</DL>
<HR>
<A NAME="getAsynchronousWorkersCore()"><!-- --></A><H3>
getAsynchronousWorkersCore</H3>
<PRE>
public int <B>getAsynchronousWorkersCore</B>()</PRE>
<DL>
<DD>Returns the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAsynchronousWorkersCore(int)"><!-- --></A><H3>
setAsynchronousWorkersCore</H3>
<PRE>
public void <B>setAsynchronousWorkersCore</B>(int&nbsp;min)</PRE>
<DL>
<DD>Sets the minimum number of threads to keep alive for background
revalidations due to the <code>stale-while-revalidate</code> directive.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>min</CODE> - should be greater than zero and less than or equal
to <code>getAsynchronousWorkersMax()</code></DL>
</DD>
</DL>
<HR>
<A NAME="getAsynchronousWorkerIdleLifetimeSecs()"><!-- --></A><H3>
getAsynchronousWorkerIdleLifetimeSecs</H3>
<PRE>
public int <B>getAsynchronousWorkerIdleLifetimeSecs</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAsynchronousWorkerIdleLifetimeSecs(int)"><!-- --></A><H3>
setAsynchronousWorkerIdleLifetimeSecs</H3>
<PRE>
public void <B>setAsynchronousWorkerIdleLifetimeSecs</B>(int&nbsp;secs)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>secs</CODE> - idle lifetime in seconds</DL>
</DD>
</DL>
<HR>
<A NAME="getRevalidationQueueSize()"><!-- --></A><H3>
getRevalidationQueueSize</H3>
<PRE>
public int <B>getRevalidationQueueSize</B>()</PRE>
<DL>
<DD>Returns the current maximum queue size for background revalidations.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setRevalidationQueueSize(int)"><!-- --></A><H3>
setRevalidationQueueSize</H3>
<PRE>
public void <B>setRevalidationQueueSize</B>(int&nbsp;size)</PRE>
<DL>
<DD>Sets the current maximum queue size for background revalidations.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheConfig.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/http/impl/client/cache/CachingHttpClient.html" title="class in org.apache.http.impl.client.cache"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/http/impl/client/cache/CacheConfig.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CacheConfig.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 1999-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>