782 lines
47 KiB
HTML
782 lines
47 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="topic" />
|
|
<meta name="DC.Title" content="Module mod_cache" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzaiemod_cache" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Module mod_cache</title>
|
|
</head>
|
|
<body id="rzaiemod_cache"><a name="rzaiemod_cache"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<!--Java sync-link--><h1 class="topictitle1">Module mod_cache</h1>
|
|
<div><div class="important"><span class="importanttitle">Important:</span> Information
|
|
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
|
|
It is recommended that you install the latest PTFs to upgrade to the latest
|
|
level of the HTTP Server for i5/OS. Some of the topics documented here are
|
|
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
|
|
<p><strong>Summary</strong></p>
|
|
<p>This module contains directives that define support for the HTTP Proxy
|
|
function which includes the proxy caching function.</p>
|
|
<div class="section"><h4 class="sectiontitle">Cache Expiry Times</h4><p>Cache expiry times are different
|
|
than expiry times provided in HTTP response data. Cache expiry times are calculated
|
|
by caching agents (such as a proxy server), whereas expiry times in HTTP response
|
|
data are provided by content servers (for example, via HTTP Expires headers).
|
|
If cacheable data from content servers contains expiry times, a caching agent
|
|
(or proxy) must use cache expiry times that are no later than the corresponding
|
|
data expiry times. In other words, caching agents may not serve data from
|
|
cache after it has expired, however they may stop serving it from cache prior
|
|
to such time. </p>
|
|
<p>If content servers do not provide expiry times for cacheable
|
|
data, the caching agent (or proxy) may try to use other response information
|
|
to calculate acceptable cache expiry times, or it may use some arbitrary default
|
|
value, as determined by the administrator.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> Response data is considered
|
|
cacheable for the proxy function if it satisfies criteria described under <a href="#rzaiemod_cache__criteria">Criteria for Local Proxy Cache</a>.</div>
|
|
<p>The proxy
|
|
function follows these rules to determine which directive settings to use
|
|
to calculate cache expiry times for HTTP proxy response data stored in the
|
|
local proxy cache. </p>
|
|
<ol><li>If HTTP response data contains expiry times (via Expires header for HTTP
|
|
requests only) these times are also used as cache expiry times. </li>
|
|
<li>If HTTP response data does not contain expiry times, but does contain
|
|
information pertaining to when it was last modified (via Last-Modified header
|
|
for HTTP requests, or MDTM command for FTP requests), the CacheLastModifiedFactor
|
|
and CacheMaxExpire directive settings are used to calculate cache expiry times.
|
|
</li>
|
|
<li>If HTTP response data does not contain expiry times, nor does it contain
|
|
information pertaining to when it was last modified, the CacheDefaultExpire
|
|
directive setting is used to calculate arbitrary cache expiry times. </li>
|
|
</ol>
|
|
<div class="note"><span class="notetitle">Note:</span> The first rule has one exception. If response code 304 (Not Modified)
|
|
is received for HTTP requests, Expires headers (if any) are not used to set
|
|
new cache expiry time. The second rule is applied (for 304 responses) if last
|
|
modified times from cached data are available to recalculate new cache expiry
|
|
times. If last modified times are not available from cached data, the third
|
|
rule is applied.</div>
|
|
</div>
|
|
<div class="section" id="rzaiemod_cache__criteria"><a name="rzaiemod_cache__criteria"><!-- --></a><h4 class="sectiontitle">Criteria for Local Proxy Cache</h4><p>When
|
|
configured, the server handles certain requests using the proxy function to
|
|
obtain data from remote servers, which it then serves as HTTP proxy response
|
|
data. It does this when acting as either a forward proxy or a reverse proxy
|
|
(see ProxyRequests or ProxyReverse). By default, the proxy function obtains
|
|
and handles data separately for each request. The server may be made more
|
|
efficient, however, by using a local proxy cache to store HTTP proxy response
|
|
data locally, which it then serves multiple times for multiple requests. The
|
|
server is more efficient since remote servers need only be contacted when
|
|
data in the local proxy cache expires. </p>
|
|
<p>Not all response data obtained
|
|
by the server is cached and served for multiple requests, due mostly for reasons
|
|
involving privacy, version control (frequency of change), and negotiable content.
|
|
This type of response data is not considered cacheable and must be obtained
|
|
from remote servers for each request.</p>
|
|
<p><strong>Standard Criteria</strong></p>
|
|
<p>Standard
|
|
criteria for the server's local proxy cache and proxy function, in regards
|
|
to response data obtained using specified protocols, is described in the following
|
|
lists. This criteria is used to determine whether HTTP proxy response data
|
|
is cacheable and may be served multiple times for multiple requests. </p>
|
|
<p>HTTP
|
|
response data:</p>
|
|
<ul><li>Only data requested using the GET method is cacheable. </li>
|
|
<li>Only data received on a request that does not end with a '/' is cacheable. <ul><li>200 (OK) </li>
|
|
<li>203 (Non Authoritative) </li>
|
|
<li>300 (Multiple Choices) </li>
|
|
<li>301 (Moved Permanently) </li>
|
|
<li>304 (Not Modified) </li>
|
|
</ul>
|
|
</li>
|
|
<li>If data contains an Expires header, the header must be valid. <div class="note"><span class="notetitle">Note:</span> This
|
|
does not apply to data that does not contain an Expires header. </div>
|
|
</li>
|
|
<li>If data contains an Expires header, the header must not specify a time
|
|
that has already past (according to local system time). </li>
|
|
<li>If data contains an Expires header, the expiration time must be greater
|
|
than the configured minimum expiration time. </li>
|
|
<li>Data received with response code 200 (OK) must contain either a Last-Modified
|
|
header or an ETag header. This requirement is waived if on is specified for
|
|
the CacheIgnoreNoLastMod directive. </li>
|
|
<li>Data received with response code 304 (Not Modified) is not cacheable if
|
|
a previous version is not already in cache. </li>
|
|
<li>If data contains a Cache-Control header, the header must not specify the
|
|
value "no-store" or "private". </li>
|
|
<li>If data contains a Pragma header, the header must not specify the value
|
|
"no-cache". </li>
|
|
<li>If the request provides an Authorization header (possibly used by the
|
|
remote server), response data must contain a Cache-Control header that specifies
|
|
one or more of the following values: "s-maxage", "must-revalidate" or "public".
|
|
</li>
|
|
<li>If data contains a Content-Length header, the header must not specify
|
|
a value that exceeds the minimum or maximum data size limits set by the CacheMinFileSize
|
|
and CacheMaxFileSize directives. See Additional Criteria for more information.</li>
|
|
</ul>
|
|
<p>FTP response data: </p>
|
|
<ul><li>Only data requested using the GET method is cacheable. </li>
|
|
<li>Data is only cached if LIST or RETR commands return one of the following
|
|
response codes: <ul><li>125 (OK, Data Transfer Starting) </li>
|
|
<li>150 (OK, Opening Data Connection) </li>
|
|
<li>226 (OK, Closing Data Connection) </li>
|
|
<li>250 (OK)</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> The LIST command is used to retrieve directory listings. The RETR
|
|
command is used to retrieve data files.</div>
|
|
</li>
|
|
<li>Data must contain information for an HTTP Last-Modified header (produced
|
|
via MDTM command with response code 213, see Notes: below). This requirement
|
|
is waived if on is specified for the CacheIgnoreNoLastMod directive. </li>
|
|
<li>If data contains information for an HTTP Content-Length header (produced
|
|
via SIZE command with response code 213), the header must not specify a value
|
|
that exceeds the minimum or maximum data size limits set by the CacheMinFileSize
|
|
and CacheMaxFileSize directives, respectively. See Additional Criteria for
|
|
more information. </li>
|
|
</ul>
|
|
<p>HTTPS (or SSL-tunneling over HTTP) response data: </p>
|
|
<ul><li>Data requested using SSL-tunneling over HTTP is not cacheable. </li>
|
|
</ul>
|
|
<p>No other protocols are supported by the proxy function. </p>
|
|
<p><strong>Additional
|
|
Criteria </strong></p>
|
|
<p>Additional criteria for the server's local proxy cache
|
|
and proxy functions may be imposed by the function providing underlying cache
|
|
support. Currently, this includes only the disk cache function. </p>
|
|
<p>The
|
|
following list describes additional restrictions on HTTP proxy response data
|
|
stored in a local proxy cache, imposed by the mod_disk_cache module: </p>
|
|
<ul><li>Cache data must not exceed the minimum or maximum data size limits set
|
|
by the CacheMinFileSize and CacheMaxFileSize directives. This restriction
|
|
applies regardless of Content-Length header values (if any) in HTTP proxy
|
|
response data. </li>
|
|
<li>Data with cache expiry times that will expire within the minimum time
|
|
margin set by the CacheTimeMargin directive is not cached. This restriction
|
|
applies to HTTP proxy response data, using cache expiry times calculated according
|
|
to rules described in the Cache Expiry Times. See mod_disk_cache for other
|
|
restriction that may apply. </li>
|
|
</ul>
|
|
</div>
|
|
<p><strong>Directives</strong></p>
|
|
<ul><li><a href="#cachedefaultexpire">CacheDefaultExpire</a> </li>
|
|
<li><a href="#cacheexpirycheck">CacheExpiryCheck</a> </li>
|
|
<li><a href="#cacheignorecachecontrol">CacheIgnoreCacheControl</a> </li>
|
|
<li><a href="#cacheignorenolastmod">CacheIgnoreNoLastMod</a> </li>
|
|
<li><a href="#cachelastmodifiedfactor">CacheLastModifiedFactor</a> </li>
|
|
<li><a href="#cachemaxexpire">CacheMaxExpire</a> </li>
|
|
<li><a href="#cachemaxfilesize">CacheMaxFileSize</a> </li>
|
|
<li><a href="#cacheminfilesize">CacheMinFileSize</a> </li>
|
|
<li><a href="#cachetimemargin">CacheTimeMargin</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="hr" id="cachedefaultexpire"><a name="cachedefaultexpire"><!-- --></a><h2 class="topictitle2">CacheDefaultExpire </h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheDefaultExpire <em>period</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheDefaultExpire 3600</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="cachedefaultexpire__cachedefaultexpire_context"><a name="cachedefaultexpire__cachedefaultexpire_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="cachedefaultexpire__cachedefaultexpire_origin"><a name="cachedefaultexpire__cachedefaultexpire_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheDefaultExpire 3 </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheDefaultExpire directive specifies the default number of seconds
|
|
in which cacheable HTTP proxy response data will be set to expire within the
|
|
local proxy cache, starting from the time it is obtained by the server.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>period </em></dt>
|
|
<dd><ul><li>The <em>period</em> parameter defines the default cache expiry period, in
|
|
seconds. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>This setting is used to calculate arbitrary cache expiry
|
|
times for HTTP proxy response data stored in the local proxy cache. See Cache
|
|
Expiry Times for more information on how the server determines which settings
|
|
to use to calculate cache expiry times. See the CacheIgnoreNoLastMod directive
|
|
for information relating to how cache criteria may be waived for this setting
|
|
to take affect. </p>
|
|
<p>If this setting is used, cache expiry times are calculated
|
|
by adding the specified number of seconds to the time that data is received
|
|
by the proxy function. </p>
|
|
<dl><dt class="dlterm"><strong>Example</strong>:</dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheDefaultExpire 3600
|
|
CacheMaxExpire 86400
|
|
CacheLastModifiedFactor 0.3</pre>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>In the example, if a cacheable data is retrieved from a server that does
|
|
not provide an expiry time (via HTTP Expires header), nor does it indicate
|
|
when the data was last modified (via HTTP Last-Modified header, or FTP MDTM
|
|
command), the server will cache and serve the data for 3600 seconds (since
|
|
CacheDefaultExpire is set to 3600 and "on" is specified for CacheIgnoreNoLastMod).
|
|
If an expiry time or last-modified time is provided, CacheDefaultExpire would
|
|
not be used (see Cache Expiry Times). </p>
|
|
<div class="note"><span class="notetitle">Note:</span> Response data is considered cacheable for the proxy function if it satisfies
|
|
criteria described under Criteria for Local Proxy Cache.</div>
|
|
<ul><li>Setting ProxyRequests and ProxyReverse to off negates this directive.
|
|
</li>
|
|
<li>Setting ProxyNoConnect to on negates this directive. </li>
|
|
<li>This directive is used only if CacheRoot is set. </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cacheexpirycheck"><a name="cacheexpirycheck"><!-- --></a><h2 class="topictitle2">CacheExpiryCheck</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheExpiryCheck <em>on | off </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheExpiryCheck on </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="cacheexpirycheck__cacheexpirycheck_context"><a name="cacheexpirycheck__cacheexpirycheck_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="cacheexpirycheck__cacheexpirycheck_origin"><a name="cacheexpirycheck__cacheexpirycheck_origin"><!-- --></a>iSeries™ </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheExpiryCheck on</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheExpiryCheck directive specifies whether the server is to observe
|
|
cache expiry times when cached data is requested using the disk cache function
|
|
(see CacheRoot). </p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>on | off </em></dt>
|
|
<dd><ul><li>If <em>on</em> is specified (the default), the server will perform and apply
|
|
all cache expiry time checks for data currently available in cache. </li>
|
|
<li>If <em>off</em> is specified, cache expiry times will not be observed and
|
|
cached data (if any) will always be available. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>Cache expiry time checks may be disabled (off) when the content of the
|
|
cache is managed by an application or process other than the server itself.
|
|
If the content of the cache is not managed by an application or process other
|
|
than the server, this setting must be set to on (the default) to prevent the
|
|
disk cache function from making expired data appear valid. </p>
|
|
<div class="note"><span class="notetitle">Note:</span> When the disk cache function is used to support a local proxy cache,
|
|
this setting determines whether cache expiry times are observed for the proxy
|
|
function. Once cached, data is usually available from cache until its respective
|
|
cache expiry times has passed. However, if cache expiry time checks are disabled
|
|
(CacheExpiryCheck off), the proxy function will serve cached HTTP proxy response
|
|
data regardless of whether it has expired. This effectively causes the disk
|
|
cache function to ignore cache expiry times calculated using the CacheDefaultExpire,
|
|
CacheMaxExpire, and CacheLastModifiedFactor directives for a local proxy cache,
|
|
as well as any expiry time provided via Expires headers (for HTTP requests). </div>
|
|
<p>See the CacheRoot directive for more information on how the disk cache
|
|
function is used to support a local proxy cache. </p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cacheignorecachecontrol"><a name="cacheignorecachecontrol"><!-- --></a><h2 class="topictitle2">CacheIgnoreCacheControl</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheIgnoreCacheControl <em>on | off </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheIgnoreCacheControl off </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="cacheignorecachecontrol__cacheignorecachecontrol_context"><a name="cacheignorecachecontrol__cacheignorecachecontrol_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="cacheignorecachecontrol__cacheignorecachecontrol_origin"><a name="cacheignorecachecontrol__cacheignorecachecontrol_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheIgnoreCacheControl on </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheIgnoreCacheControl directive specifies whether the server is to
|
|
observe certain cache controlling request headers (for example, Cache-Control
|
|
and Pragma) when handling requests using the proxy function. </p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>on | off </em></dt>
|
|
<dd><ul><li>If <em>on</em> is specified, the server will not observe cache controlling
|
|
request headers. </li>
|
|
<li>If <em>off</em> is specified (the default), the server will observe cache
|
|
controlling request headers when HTTP proxy response data is available from
|
|
the local proxy cache. </li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>By default, the server observes certain cache controlling request headers
|
|
(for example, "Cache-Control : no-store" and "Pragma : no-cache") when handling
|
|
requests using the proxy function. If such headers are present in HTTP request
|
|
data sent to the server, the proxy function will not serve HTTP proxy response
|
|
data from the local proxy cache since these headers indicate that cached data
|
|
is not wanted. However, if on is specified for this setting, the proxy function
|
|
will ignore cache controlling request headers and serve HTTP proxy response
|
|
data from cache, if it is available. </p>
|
|
<ul><li>Setting ProxyRequests and ProxyReverse to off negates this directive.
|
|
</li>
|
|
<li>This directive is used only if CacheRoot is set. </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cacheignorenolastmod"><a name="cacheignorenolastmod"><!-- --></a><h2 class="topictitle2">CacheIgnoreNoLastMod</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheIgnoreNoLastMod <em>on | off </em></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheIgnoreNoLastMod off </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="cacheignorenolastmod__cacheignorenolastmod_context"><a name="cacheignorenolastmod__cacheignorenolastmod_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="cacheignorenolastmod__cacheignorenolastmod_origin"><a name="cacheignorenolastmod__cacheignorenolastmod_origin"><!-- --></a>Apache</span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheIgnoreNoLastMod on </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheIgnoreNoLastMod directive specifies whether the server may cache
|
|
HTTP proxy response data in the local proxy cache, if it does not contain
|
|
a Last-Modified header or an ETag header. </p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>on | off </em></dt>
|
|
<dd><ul><li>If <em>off</em> is specified (the default), the server requires either an
|
|
ETag header or a Last-Modified header to be present in all HTTP proxy response
|
|
data cached in the local proxy cache. </li>
|
|
<li>If <em>on</em> is specified, the server will not require an ETag header
|
|
or Last-Modified header to be present in HTTP proxy response data cached in
|
|
the local proxy cache. </li>
|
|
</ul>
|
|
<p>By default, if data does not contain either an ETag header or a Last-Modified
|
|
header, the server does not consider it cacheable. Specifying on for this
|
|
setting waives this criteria. See Criteria for Local Proxy Cache for more
|
|
information. </p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example One</strong>:</dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheIgnoreNoLastMod off
|
|
CacheDefaultExpire 1</pre>
|
|
<p>In the example, if data is received from
|
|
a server that does not provide an expiry time (via HTTP Expires header), nor
|
|
does it have an ETag or Last-Modified header, it is not considered cacheable
|
|
since off is specified for CacheIgnoreNoLastMod. The server serves the data
|
|
for the current request, but does not cache it for subsequent requests. The
|
|
settings for CacheDefaultExpire is not used. </p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example Two</strong>:</dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheIgnoreNoLastMod on
|
|
CacheDefaultExpire 1</pre>
|
|
<p>In this example, if data is received from
|
|
a server that does not provide an expiry time (via HTTP Expires header), nor
|
|
does it have an ETag or Last-Modified header (as in example one), it is still
|
|
considered cacheable since on is specified for CacheIgnoreNoLastMod. The server
|
|
serves the data for the current request, and may calculate a cache expiry
|
|
time using CacheDefaultExpire to cache it for subsequent requests, assuming
|
|
it satisfies all other cache criteria. </p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<div class="note"><span class="notetitle">Note:</span> Response data is considered cacheable for the proxy function if it satisfies
|
|
criteria described under Criteria for Local Proxy Cache.</div>
|
|
<ul><li>Setting ProxyRequests and ProxyReverse to off negates this directive.
|
|
</li>
|
|
<li>Setting ProxyNoConnect to on negates this directive. </li>
|
|
<li>This directive is used only if CacheRoot is set. </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachelastmodifiedfactor"><a name="cachelastmodifiedfactor"><!-- --></a><h2 class="topictitle2">CacheLastModifiedFactor</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheLastModifiedFactor <em>factor</em> </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheLastModifiedFactor 0.1 </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: <span id="cachelastmodifiedfactor__cachelastmodifiedfactor_context"><a name="cachelastmodifiedfactor__cachelastmodifiedfactor_context"><!-- --></a>server
|
|
config, virtual host </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: <span id="cachelastmodifiedfactor__cachelastmodifiedfactor_origin"><a name="cachelastmodifiedfactor__cachelastmodifiedfactor_origin"><!-- --></a>Apache </span></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheLastModifiedFactor 0.3</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheLastModifiedFactor directive specifies a multiplication factor
|
|
used in the formula: </p>
|
|
<blockquote><pre>period = time-since-last-modification *<factor></pre>
|
|
</blockquote>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>factor </em></dt>
|
|
<dd><ul><li>The <em>factor</em> parameter specifies the multiplication factor used in
|
|
the formula (described above) to calculate cache expiry times. </li>
|
|
</ul>
|
|
<p>This formula is used and setting is used along with CacheMaxExpire
|
|
to calculate cache expiry times for HTTP proxy response data store in the
|
|
local proxy cache, based on when the data was last modified. See Cache Expiry
|
|
Times for more information on how the server determines which settings to
|
|
use when calculating cache expiry times. </p>
|
|
<p>If this setting is used,
|
|
cache expiry times are calculated by adding the lesser of the calculated period
|
|
(using the formula above) and the period specified for CacheMaxExpire to the
|
|
time that data is received by the proxy function. Using this method, data
|
|
that has not changed recently is served from cache longer than data that has
|
|
changed recently, since its last-modified time is older and will produce a
|
|
greater cache expiry period. This assumes that both responses yield calculated
|
|
cache expiry periods that are less than the CacheMaxExpire directive setting. </p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example</strong>:</dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheMaxExpire 86400
|
|
CacheLastModifiedFactor 0.3</pre>
|
|
<p>In this example, if cacheable data
|
|
is received from a server that does not provide an expiry time (via HTTP Expires
|
|
header), but does indicate that the data was last changed 10 hours ago (via
|
|
HTTP Last-Modified header, or FTP MDTM command), the server would calculate
|
|
a period of 3 hours using CacheLastModifiedFactor (10 * 0.3) and would cache
|
|
and serve the data for the same period of time since it is less than the maximum
|
|
limit of 24 hours set by CacheMaxExpire. </p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<div class="note"><span class="notetitle">Note:</span> Response data is considered cacheable for the proxy function if it satisfies
|
|
criteria described under Criteria for Local Proxy Cache.</div>
|
|
<p>If a similar response for this example indicates that the data was last
|
|
changed 8 days ago (or 192 hours), the server would calculate a period of
|
|
57.6 hours using CacheLastModifiedFactor (192 * 0.3), but it would cache and
|
|
serve the data for a period of only 24 hours since CacheMaxExpire sets a limit
|
|
on the maximum period for the CacheLastModifiedFactor formula. </p>
|
|
<ul><li>Setting ProxyRequests and ProxyReverse to off negates this directive.
|
|
</li>
|
|
<li>Setting ProxyNoConnect to on negates this directive. </li>
|
|
<li>This directive is used only if CacheRoot is set. </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachemaxexpire"><a name="cachemaxexpire"><!-- --></a><h2 class="topictitle2">CacheMaxExpire</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheMaxExpire <var class="varname">period</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheMaxExpire 86400</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: server config, virtual host</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: Apache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: <samp class="codeph">LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheMaxExpire 43200</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheMaxExpire directive specifies the maximum number of seconds in
|
|
which cacheable HTTP proxy response data will be set to expire within the
|
|
local proxy cache (when the CacheLastModifiedFactor directive setting is used).
|
|
This setting has no affect on other settings used to calculate cache expiry
|
|
times.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>period</em></dt>
|
|
<dd><ul><li> The <var class="varname">period</var> parameter specifies the maximum cache expiry
|
|
period, in seconds, that may be used when expiry times are calculated using
|
|
the CacheLastModifiedFactor directive setting.<p>This setting is used along
|
|
with the CacheLastModifiedFactor directive setting to calculate expiry times
|
|
for HTTP proxy response data stored in the local proxy cache, based on when
|
|
data was last modified. See Cache Expiry Times for more information on how
|
|
the server determines which settings to use when calculating cache expiry
|
|
times. If this setting is used, cache expiry times are calculated by adding
|
|
the lesser of the specified period and the period calculated using CacheLastModifiedFactor
|
|
to the time that data is received by the proxy function.</p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example</strong></dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheMaxExpire 86400
|
|
CacheLastModifiedFactor 0.3</pre>
|
|
<p>In this example, if cacheable data
|
|
is received from a server that does not provide an expiry time (via HTTP Expires
|
|
header), but does indicate that the data was last changed 5 days ago (via
|
|
HTTP Last-Modified header, or FTP MDTM command), the server would calculate
|
|
a period of 1.5 days using CacheLastModifiedFactor (5 * 0.3), but it would
|
|
cache and serve the data for a period of only 86400 seconds (1 day) since
|
|
CacheMaxExpire sets a maximum limit of 86400 seconds.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<div class="note"><span class="notetitle">Note:</span> Response data is considered cacheable for the proxy function if it satisfies
|
|
criteria described under Criteria for Local Proxy Cache.</div>
|
|
<ul><li></li>
|
|
<li>Setting ProxyRequests and ProxyReverse to off negates this directive.</li>
|
|
<li>Setting ProxyNoConnect to on negates this directive.</li>
|
|
<li>This directive is used only if CacheRoot is set</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachemaxfilesize"><a name="cachemaxfilesize"><!-- --></a><h2 class="topictitle2">CacheMaxFileSize</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheMaxFileSize <var class="varname">size</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheMaxFileSize 1000000</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: server config, virtual host</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none </td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: Apache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows:<samp class="codeph"> LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM,
|
|
disk_cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheMaxFileSize 4000000</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheMaxFileSize directive specifies the maximum amount of data that
|
|
may be stored in the proxy disk cache for a single URL, in bytes. This setting
|
|
effectively placing a maximum data size limit on individual cache entries.
|
|
If the disk cache function is disabled (see CacheRoot), this setting has no
|
|
affect.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>size</em></dt>
|
|
<dd><ul><li>The <var class="varname">size</var> parameter specifies the maximum number of
|
|
bytes allowed for cache data entries.<p>A minimum document size limits specified
|
|
using CacheMinFileSize.</p>
|
|
<p><strong>Notes for local proxy cache:</strong></p>
|
|
<p>When
|
|
the disk cache function is used to support a local proxy cache, this setting
|
|
places a maximum data size limit on HTTP proxy responses which remain in the
|
|
cache after cache maintenance has run. See the CachGcDaily or CacheGcInterval
|
|
directives for more information on how the disk cache maintenance function
|
|
is used to support a local proxy cache.</p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example</strong></dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheMaxFileSize 5000000
|
|
CacheMinFileSize 400000</pre>
|
|
<p>For this example, if 7.2 megabytes of
|
|
cacheable HTTP proxy response data is available for a single proxy request
|
|
but will be removed during the next cache maintenance cycle since it is larger
|
|
than the 5000000 byte maximum data size limit imposed by CacheMaxFileSize.
|
|
A 3.8 megabyte HTTP proxy response may be cached for subsequent proxy requests
|
|
and will remain in the cache after the cache maintenance cycle has run since
|
|
it is smaller than the 5000000 byte maximum data size limit and larger than
|
|
the 400000 byte minimum data size limit (set by CacheMinFileSize).</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>If the values specified for CacheMinFileSize and CacheMaxFileSize are changed
|
|
once they have been used to cache data, the server will discard existing cache
|
|
data that does not adhere to the new limits when it runs disk cache maintenance.
|
|
See CachGcDaily or CacheGcInterval for more details on the disk cache maintenance
|
|
process.</p>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cacheminfilesize"><a name="cacheminfilesize"><!-- --></a><h2 class="topictitle2">CacheMinFileSize</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheMinFileSize <var class="varname">size</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheMinFileSize 1</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: server config, virtual host</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: Apache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows: LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM, <samp class="codeph">LoadModule
|
|
disk_cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</samp></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheMinFileSize 40</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheMinFileSize directive specifies the minimum amount of data that
|
|
may be stored in the proxy disk cache for a single URL, in bytes. This setting
|
|
effectively places a minimum data size limit on individual cache entries.
|
|
If the disk cache function is disabled (see CacheRoot), this setting has no
|
|
affect.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>size</em></dt>
|
|
<dd><ul><li> The <var class="varname">size</var> parameter specifies the minimum number of
|
|
bytes allowed for cache data entries.<p>A maximum document size limits specified
|
|
using CacheMaxFileSize.</p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p><strong>Notes for local proxy cache:</strong></p>
|
|
<p>When the disk
|
|
cache function is used to support a local proxy cache, this setting places
|
|
a minimum data size limit on HTTP proxy responses which remain in the cache
|
|
after cache maintenance has run. See CachGcDaily and CacheGcInterval directives
|
|
for more details on the how the disk cache maintenance function is used to
|
|
support a local proxy cache.</p>
|
|
<dl><dt class="dlterm"><strong>Example</strong></dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheMaxFileSize 5000000
|
|
CacheMinFileSize 400000</pre>
|
|
<p>For this example, if 240 kilobytes of
|
|
cacheable HTTP proxy response data is available for a single proxy request,
|
|
but will be removed during the next cache maintenance cycle since it is less
|
|
than the 400000 byte minimum data size limit imposed by CacheMinFileSize.
|
|
A 2.7 megabyte HTTP proxy response may be cached for subsequent proxy requests
|
|
and will remain in the cache after the cache maintenance cycle has run since
|
|
it is larger than the 400000 byte minimum data size limit and smaller than
|
|
the 5000000 byte maximum data size limit (set by CacheMaxFileSize).</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>If the values specified for CacheMinFileSize and CacheMaxFileSize are changed
|
|
once they have been used to cache data, the server will discard existing cache
|
|
data that does not adhere to the new limits when it runs disk cache maintenance.
|
|
See CachGcDaily or CacheGcInterval for more details on the disk cache maintenance
|
|
process.</p>
|
|
<ul><li>If set greater than CacheMaxFileSize, the size parameter will be ignored
|
|
and the default value will be used.</li>
|
|
<li>The default for this directive is dependent on the value set for CacheMaxFileSize.
|
|
If CacheMaxFileSize is set greater than 200 the default for this directive
|
|
is 200, otherwise the default is 0.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachetimemargin"><a name="cachetimemargin"><!-- --></a><h2 class="topictitle2">CacheTimeMargin</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="void" border="0" rules="none"><tbody><tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Module">Module</a></strong>: mod_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheTimeMargin <var class="varname">period</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheTimeMargin 120</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Context">Context</a></strong>: server config, virtual host</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Override">Override</a></strong>: none</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Origin">Origin</a></strong>: Apache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__UsageConsiderations">Usage Considerations</a></strong>: A LoadModule is required in
|
|
the configuration file prior to using the directive. The statement should
|
|
be as follows:<pre>LoadModule cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
|
|
LoadModule disk_cache_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM</pre>
|
|
</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Example">Example</a></strong>: CacheTimeMargin 300</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheTimeMargin directive specifies the minimum number of seconds
|
|
remaining prior to data expiration, as indicated in the expires response header,
|
|
in order for data to be cached by the server using the disk cache function.
|
|
If the disk cache function is disabled (see CacheRoot), this setting has no
|
|
affect.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>period</em></dt>
|
|
<dd><ul><li> The <var class="varname">period</var> parameter specifies the minimum time margin
|
|
for cache update requests (in seconds).<p>The server calculates cache time
|
|
margins (or periods) for cache update requests by subtracting the current
|
|
system time from the computed expiry time. Data for cache update requests
|
|
that produce cache time margins, that are less than the specified minimum
|
|
time margin is not cached by the server.</p>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p><strong>Notes for local proxy cache:</strong></p>
|
|
<p>The disk cache
|
|
function uses CacheDefaultExpire, CacheLastModifiedFactor, and CacheMaxExpire
|
|
directives which may produce cache time margins that are less than the minimum
|
|
time margin specified by the CacheTimeMargin directive. In this case, the
|
|
CacheTimeMargin directive will also be used to determine if the file will
|
|
be cached. See the CacheRoot directive for more information on how the disk
|
|
cache function is used to support a local proxy cache.</p>
|
|
<dl><dt class="dlterm"><strong>Example</strong></dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot proxyCache
|
|
CacheTimeMargin 120</pre>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>In this example, if cacheable HTTP proxy response data is available, the
|
|
data will be served (by proxy), but it will not be cached for subsequent proxy
|
|
requests if set to expire in less than 120 seconds (CacheTimeMargin 120).
|
|
If the HTTP proxy response data is set to expire in more than two minutes,
|
|
the data will be served (by proxy) and will also be cached for subsequent
|
|
proxy requests.</p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |