| <!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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheConfig.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><B>PREV CLASS</B></A> |
| <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> |
| <A HREF="CacheConfig.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 "backend" |
| 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 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> |
| 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 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> |
| 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 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> |
| 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 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> |
| Default setting for heuristic caching</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static 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> |
| 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 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> |
| 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 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> |
| 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 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> |
| 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 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> |
| 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 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> |
| Default maximum queue length for background revalidation requests.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== 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> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkerIdleLifetimeSecs()">getAsynchronousWorkerIdleLifetimeSecs</A></B>()</CODE> |
| |
| <BR> |
| 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersCore()">getAsynchronousWorkersCore</A></B>()</CODE> |
| |
| <BR> |
| 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getAsynchronousWorkersMax()">getAsynchronousWorkersMax</A></B>()</CODE> |
| |
| <BR> |
| 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> float</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicCoefficient()">getHeuristicCoefficient</A></B>()</CODE> |
| |
| <BR> |
| 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> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getHeuristicDefaultLifetime()">getHeuristicDefaultLifetime</A></B>()</CODE> |
| |
| <BR> |
| 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxCacheEntries()">getMaxCacheEntries</A></B>()</CODE> |
| |
| <BR> |
| 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> long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSize()">getMaxObjectSize</A></B>()</CODE> |
| |
| <BR> |
| 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxObjectSizeBytes()">getMaxObjectSizeBytes</A></B>()</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getMaxUpdateRetries()">getMaxUpdateRetries</A></B>()</CODE> |
| |
| <BR> |
| 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> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#getRevalidationQueueSize()">getRevalidationQueueSize</A></B>()</CODE> |
| |
| <BR> |
| 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> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isHeuristicCachingEnabled()">isHeuristicCachingEnabled</A></B>()</CODE> |
| |
| <BR> |
| Returns whether heuristic caching is enabled.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#isSharedCache()">isSharedCache</A></B>()</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkerIdleLifetimeSecs(int)">setAsynchronousWorkerIdleLifetimeSecs</A></B>(int secs)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersCore(int)">setAsynchronousWorkersCore</A></B>(int min)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setAsynchronousWorkersMax(int)">setAsynchronousWorkersMax</A></B>(int max)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCachingEnabled(boolean)">setHeuristicCachingEnabled</A></B>(boolean heuristicCachingEnabled)</CODE> |
| |
| <BR> |
| Enables or disables heuristic caching.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicCoefficient(float)">setHeuristicCoefficient</A></B>(float heuristicCoefficient)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setHeuristicDefaultLifetime(long)">setHeuristicDefaultLifetime</A></B>(long heuristicDefaultLifetimeSecs)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxCacheEntries(int)">setMaxCacheEntries</A></B>(int maxCacheEntries)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSize(long)">setMaxObjectSize</A></B>(long maxObjectSize)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxObjectSizeBytes(int)">setMaxObjectSizeBytes</A></B>(int maxObjectSizeBytes)</CODE> |
| |
| <BR> |
| <B>Deprecated.</B> <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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setMaxUpdateRetries(int)">setMaxUpdateRetries</A></B>(int maxUpdateRetries)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setRevalidationQueueSize(int)">setRevalidationQueueSize</A></B>(int size)</CODE> |
| |
| <BR> |
| 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> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../org/apache/http/impl/client/cache/CacheConfig.html#setSharedCache(boolean)">setSharedCache</A></B>(boolean isSharedCache)</CODE> |
| |
| <BR> |
| Sets whether the cache should behave as a shared cache or not.</TD> |
| </TR> |
| </TABLE> |
| <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> |
| |
| <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> <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 maxObjectSizeBytes)</PRE> |
| <DL> |
| <DD><B>Deprecated.</B> <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 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 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 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 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 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 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 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 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 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 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 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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CacheConfig.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../../org/apache/http/impl/client/cache/BasicHttpCacheStorage.html" title="class in org.apache.http.impl.client.cache"><B>PREV CLASS</B></A> |
| <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> |
| <A HREF="CacheConfig.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 1999-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |