851 lines
52 KiB
HTML
851 lines
52 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_disk_cache" />
|
|
<meta name="abstract" content="This topic describes the module mod_disk_cache for HTTP Server (powered by Apache)." />
|
|
<meta name="description" content="This topic describes the module mod_disk_cache for HTTP Server (powered by Apache)." />
|
|
<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_disk_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_disk_cache</title>
|
|
</head>
|
|
<body id="rzaiemod_disk_cache"><a name="rzaiemod_disk_cache"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<!--Java sync-link--><h1 class="topictitle1"> Module mod_disk_cache</h1>
|
|
<div><p>This topic describes the module mod_disk_cache for HTTP Server
|
|
(powered by Apache).</p>
|
|
<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>
|
|
<div class="section" id="rzaiemod_disk_cache__twodiscmain"><a name="rzaiemod_disk_cache__twodiscmain"><!-- --></a><h4 class="sectiontitle">Two Phase Disk Cache Maintenance</h4><p>The
|
|
server may take each iteration of the disk cache maintenance process through
|
|
one or two phases, depending on how much maintenance is needed. In the first
|
|
phase, the server will examine the file system directories for the disk cache
|
|
function and discard data that no longer complies with the current server
|
|
configuration settings. It will also discard unused or unmodified data according
|
|
to the criteria set by CacheGcClean or CacheGcUnused directives. File names
|
|
and expiration times for the remaining data will be collected and the total
|
|
amount of space allocated for them will be tallied. If the tally is above
|
|
the maximum disk storage limit (set by CacheSize), the server will go into
|
|
phase two. If the tally is at or below the maximum disk storage limit, the
|
|
server will stop the current iteration of the maintenance process. If the
|
|
server takes the current iteration into the second phase, information collected
|
|
in the first phase for the remaining data is sorted according to cache expiry
|
|
time. The server will then discard remaining data, by order of expiration
|
|
(soonest to latest), until the amount of allocated space is at or below the
|
|
maximum disk storage limit.</p>
|
|
<p>The following steps summarize the disk cache
|
|
maintenance process:</p>
|
|
<dl><dt class="dlterm">Phase One:</dt>
|
|
<dd><ol><li>Data files are examined, one by one, starting at the directory root specified
|
|
by CacheRoot.</li>
|
|
<li>Data files not complying with settings specified for CacheDirLevels, CacheDirLength,
|
|
CacheMinFileSize, and CacheMaxFileSize are discarded.</li>
|
|
<li>Unused or unmodified data matching the criteria set by CacheGcClean and
|
|
CacheGcUnused directives is discarded.</li>
|
|
<li>File names and expiration times for remaining data is collected.</li>
|
|
<li>The total amount of space allocated for remaining data is determined.
|
|
Phase two is entered if this total is greater than that specified by CacheSize.
|
|
If not, phase two is skipped and maintenance completes (until the next iteration).</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm">Phase Two:</dt>
|
|
<dd><ol><li>Information collected in phase one for remaining data is sorted according
|
|
to cache expiry times.</li>
|
|
<li>Data is discarded, by order of expiration (soonest to latest), until the
|
|
total amount of allocated space is at or below that specified by CacheSize.</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> The server stops collecting information for remaining
|
|
data when it reaches the maximum amount of memory allowed for disk cache maintenance
|
|
(set by CacheGcMemUsage). If the server reaches this limit in phase one, it
|
|
may not have recorded enough information for phase two to bring the total
|
|
amount of space allocated for the cache down to the limit specified by the
|
|
CacheSize directive in one iteration of the disk cache maintenance process.
|
|
In this case, a warning message is written to the server log and the server
|
|
completes maintenance and waits for the next disk cache maintenance iteration.</div>
|
|
</div>
|
|
<p><strong>Directives</strong></p>
|
|
<ul><li><a href="#cachedirlength">CacheDirLength</a></li>
|
|
<li><a href="#cachedirlevels">CacheDirLevels</a></li>
|
|
<li><a href="#cachegcclean">CacheGcClean</a></li>
|
|
<li><a href="#cachegcdaily">CacheGcDaily</a></li>
|
|
<li><a href="#cachegcinterval">CacheGcInterval</a></li>
|
|
<li><a href="#directiveName">CacheGcMemUsage</a></li>
|
|
<li><a href="#cachegcunused">CacheGcUnused</a></li>
|
|
<li><a href="#cacheroot">CacheRoot</a></li>
|
|
<li><a href="#cachesize">CacheSize</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="hr" id="cachedirlength"><a name="cachedirlength"><!-- --></a><h2 class="topictitle2">CacheDirLength</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheDirLength <var class="varname">length</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheDirLength 2 </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 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>: CacheDirLength 4</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheDirLength directive specifies the number of characters in subdirectory
|
|
names used by the disk cache function to store data.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>length</em></dt>
|
|
<dd><ul><li>The <var class="varname">length</var> parameter specifies the number of characters
|
|
in subdirectory names used by the disk cache function. The specified value
|
|
multiplied by the value specified for the CacheDirLevels directive must be
|
|
less than or equal to 20.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>If the values specified for CacheDirLevels and CacheDirLength are changed
|
|
once they have been used to cache data, the server will discard all existing
|
|
cache data when it runs disk cache maintenance since the file paths used to
|
|
store data no longer adhere to the new values. See the CacheGcDaily or CacheGcInterval
|
|
directives for more details on disk cache maintenance.</p>
|
|
<ul><li>This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheDirLength directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachedirlevels"><a name="cachedirlevels"><!-- --></a><h2 class="topictitle2">CacheDirLevels</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheDirLevels <var class="varname">levels</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheDirLevels 3</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 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>: CacheDirLevels 3</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheDirLevels directive specifies the number of directory levels
|
|
used by the disk cache function to store data.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>levels</em></dt>
|
|
<dd><ul><li> The <var class="varname">length</var> parameter specifies the number of directory
|
|
levels used by the disk cache function. The specified value multiplied by
|
|
the value specified for the CacheDirLength directive must be less than or
|
|
equal to 20.</li>
|
|
</ul>
|
|
<p>A hash algorithm is used to generate unique and seemingly random character
|
|
strings from hash keys (or URLs) provided for data stored in cache. These
|
|
character strings are used to build unique file system path names. Data is
|
|
stored in the file system using these path names, relative to the directory
|
|
root specified by the CacheRoot directive. This setting specifies how many
|
|
directory levels are used, while the CacheDirLength directives specifies the
|
|
length of each subdirectory name, with remaining characters simply used for
|
|
file names. The server uses the hash algorithm and directory levels to improve
|
|
the performance of the server when working with a potentially large number
|
|
of data files.</p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 1</strong></dt>
|
|
<dd><pre>CacheRoot /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/MyCache
|
|
CacheDirLevels 3
|
|
CacheDirLength 1</pre>
|
|
<p> The above example indicates that a hash key
|
|
such as ftp://ibm.com/document.html may be used to build a directory path
|
|
such as <samp class="codeph">/x/3/_/9sj4t2svBA</samp> where <samp class="codeph">x</samp>, <samp class="codeph">3</samp>,
|
|
and <samp class="codeph">_</samp> are three subdirectory names (CacheDirLevels 3) each
|
|
having a length of one character (CacheDirLength 1). The remaining characters, <samp class="codeph">9sj4t2svBA</samp>,
|
|
are used for file names.</p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 2</strong></dt>
|
|
<dd><pre>CacheRoot /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/MyCache
|
|
CacheDirLevels 5
|
|
CacheDirLength 2</pre>
|
|
<p> The above example indicates that the same
|
|
hash key described for example one (ftp://ibm.com/document.html) may be used
|
|
to build a directory path such as /x3/_9/sj/4t/2s/vBA where <samp class="codeph">x3</samp>, <samp class="codeph">_9</samp>, <samp class="codeph">sj</samp>, <samp class="codeph">4t</samp>,
|
|
and <samp class="codeph">2s</samp> are five subdirectory names (CacheDirLevels 5) each
|
|
having a length of two characters (CacheDirLength 2). The remaining characters, <samp class="codeph">vBA</samp>,
|
|
are used for file names.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>Directory paths generated in this process are relative to the directory
|
|
root defined by the CacheRoot directive. Therefore, for example one (above),
|
|
two files, one named <samp class="codeph">9sj4t2svBA.data</samp> and the other named <samp class="codeph">9sj4t2svBA.header</samp> will
|
|
be created to store data using the hash key <samp class="codeph">ftp://ibm.com/document.html</samp>.
|
|
Both files will reside within the <samp class="codeph">/QOpenSys/QIBM/UserData/HTTPA/CacheRoot/MyCache/x/3/_</samp> directory.
|
|
For example two (above), the two files will be named <samp class="codeph">vBA.data</samp> and <samp class="codeph">vBA.header</samp> and
|
|
will reside within the <samp class="codeph">/QOpenSys/QIBM/UserData/HTTPA/CacheRoot/MyCache/x3/_9/sj/4t/2s</samp> directory
|
|
using the same hash key.</p>
|
|
<p><strong>Directory length and level limits:</strong></p>
|
|
<p>Since the hash algorithm generates an exponential number of directories
|
|
using this schema, a limit must be set upon the values that CacheDirLevels
|
|
and CacheDirLength may have. The limits described as such:</p>
|
|
<pre> CacheDirLevels * CacheDirLength <= 20</pre>
|
|
<p>The maximum number of directory levels multiplied by the maximum length
|
|
of each subdirectory must be less than or equal to 20. If not, the server
|
|
will fail to activate at startup. </p>
|
|
<p>If the values specified for CacheDirLevels and CacheDirLength are changed
|
|
once they have been used to cache data, the server will discard all existing
|
|
cache data when it runs disk cache maintenance since the file paths used to
|
|
store data no longer adhere to the new values. See the CacheGcDaily or CacheGcInterval
|
|
directives for more details on disk cache maintenance.</p>
|
|
<ul><li> This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheDirLevels directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachegcclean"><a name="cachegcclean"><!-- --></a><h2 class="topictitle2">CacheGcClean</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheGcClean <var class="varname">hash-key-criteria
|
|
period</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheGcClean *2592000 (seconds, or 30 days)</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>: iSeries™</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 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>: CacheGcClean http://www.ibm.com /* 1296000</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheGcClean directive specifies a complete URL or URL match expression
|
|
and a maximum period value used to identify and remove data from cache that
|
|
has not been updated (or written to cache) within the number of specified
|
|
seconds. Multiple CacheGcClean directives are allowed. If disk cache maintenance
|
|
is disabled, this setting has no affect and the cache may grow without bound,
|
|
unless managed by some application or process other than the server.</p>
|
|
<p>This directive is similar to the CacheGcUnused directive, however the former
|
|
distinguishes when data was last written (or saved) to cache, not when it
|
|
was last served from cache.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter One</strong>: <em> hash-key-criteria</em></dt>
|
|
<dd><ul><li> The <var class="varname">hash-key-criteria</var> parameter accepts a complete
|
|
URL or URL match expression used to identify cached data by hash key. Complete
|
|
URLs do not contain asterisks (*) or question marks (?) and must match hash
|
|
keys URLs completely (see example two). URL match expressions contain one
|
|
or more asterisks (*) or question marks (?) used as wildcards to match multiple
|
|
hash keys. For example: <samp class="codeph">http://ibm.com/*</samp>, <samp class="codeph">*://ibm.com/*</samp>,
|
|
or <samp class="codeph">ftp://server?.ibm.com/*</samp> (see example one).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Parameter Two</strong>: <em>period</em></dt>
|
|
<dd><ul><li> The <var class="varname">period</var> parameter specifies the maximum amount
|
|
of time (in seconds) that matched data may remain cached.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>Cached data for the disk caching function is identified
|
|
by comparing hash keys with the value specified for the hash-key-criteria
|
|
parameter. Matched data that has not been updated (or written to cache) within
|
|
the number of seconds specified by the corresponding period parameter is discarded
|
|
by the server during phase one of the disk cache maintenance process. Matched
|
|
data that has been updated within the number of specified seconds is not affected.
|
|
Unmatched data is not affected. See <a href="#rzaiemod_disk_cache__twodiscmain">Two Phase Disk Cache Maintenance</a> for details concerning the disk cache maintenance process. </p>
|
|
<dl><dt class="dlterm"><strong>Example 1</strong>: URL match expressions</dt>
|
|
<dd><pre> CacheRoot serverCache
|
|
CacheGcClean *://ibm.com/* 2592000
|
|
CacheGcClean ftp://server?.ibm.com/* 1209600 </pre>
|
|
<p>For this example,
|
|
the first CacheGcClean directive ensures cached data with hash keys (or URLs)
|
|
that match the expression <samp class="codeph">*://ibm.com/*</samp> and has not been
|
|
updated within the past 2592000 seconds (or 30 days) is discarded during
|
|
phase one of the cache maintenance process. The second CacheGcClean directive
|
|
ensures cached data with hash keys (or URLs) that match the expression <samp class="codeph">ftp://server?.ibm.com/*</samp> and
|
|
has not been updated within the past 1209600 seconds (or 2 weeks) is discarded.</p>
|
|
<p>Example
|
|
one uses CacheGcClean directives with URL match expressions to manage data
|
|
stored in cached using the disk cache function (CacheRoot serverCache). For
|
|
the expression <samp class="codeph">*://ibm.com/*</samp>, the first wildcard (*) is used
|
|
to match one or more characters in hash keys preceding the characters <samp class="codeph">//ibm.com/</samp>.
|
|
The second wildcard (*) is used to match one or more characters succeeding
|
|
the characters <samp class="codeph">//ibm.com/</samp>. Hash keys that match this expression,
|
|
for example, include http://ibm.com/public/welcome.html and ftp://ibm.com/patch.zip.
|
|
For the expression <samp class="codeph">ftp://server?.ibm.com/*</samp>, the first wildcard
|
|
(?) is used to match any single character between ftp://server and .ibm.com/.
|
|
The second wildcard (*) is used to match one or more characters succeeding
|
|
the characters .ibm.com/. Hash keys that match this expression, for example,
|
|
include ftp://server1.ibm.com/whitepaper.pdf and ftp://server5.ibm.com/downloads/driver.exe.</p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example Two</strong>: Complete URL</dt>
|
|
<dd><pre> CacheRoot serverCache
|
|
CacheGcClean ftp://server5.ibm.com/downloads/application.zip 432000</pre>
|
|
<p>For
|
|
this example, the CacheGcClean directive uses a complete URL to ensure cached
|
|
data with the hash key <samp class="codeph">ftp://server5.ibm.com/downloads/application.zip</samp> is
|
|
discarded during phase one of the disk cache maintenance process if it has
|
|
not been updated within the past 432000 seconds (or 5 days). No other data
|
|
will be matched since complete URLs identify a single hash key. </p>
|
|
<p>The
|
|
server detects updates to cached data for the disk caching function by comparing
|
|
the "Data change date/time" values of data file attributes. These are commonly
|
|
referred to as last-modified times. When data is updated within cache, the
|
|
corresponding last-modified times record the date and time that the last update
|
|
was made.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<ul><li>This directive is negated when off is specified for CacheGcDaily and CacheGcInterval
|
|
is not specified.</li>
|
|
<li>This directive is used only if CacheRoot is set.</li>
|
|
<li>Disk cache maintenance may occur at regular time periods for CacheGcInterval
|
|
and at a particular time of day for CacheGcDaily if both are set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheGcClean directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachegcdaily"><a name="cachegcdaily"><!-- --></a><h2 class="topictitle2">CacheGcDaily</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheGcDaily <var class="varname">time-of-day | off</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheGcDaily 03:00</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>: iSeries </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 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>: CacheGcDaily 23</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheGcDaily directives specifies whether the server is to perform
|
|
disk cache maintenance, at a particular time, when the disk cache function
|
|
is enabled. If the disk cache function is disabled (the default), this setting
|
|
has no affect and the server does not perform disk cache maintenance. The
|
|
default value is 3:00 (3:00 am local system time).</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>time-of-day | off</em></dt>
|
|
<dd><ul><li> The <var class="varname">time-of-day</var> parameter accepts a value in the <samp class="codeph">HH:MM:SS</samp> format
|
|
(24 hour clock) where HH is an hour value (0 to 23), MM is a minute value
|
|
(0 to 59), and SS is a second value (0 to 59). A minute (MM) or second (SS)
|
|
value is not required. If a minute value is not specified, maintenance will
|
|
commence at the beginning of the hour specified by the hour value (see example
|
|
two). Likewise, if a second value is not specified, maintenance will commence
|
|
at the specified number of minutes past the hour (see example one). </li>
|
|
<li>If <var class="varname">off</var> is specified, maintenance will not be performed
|
|
based on a particular time of day (see example three).</li>
|
|
</ul>
|
|
<p>If <var class="varname">off</var> is not specified, the server will perform
|
|
cache maintenance every day, starting at the specified local system time (if
|
|
disk caching is enabled, see examples one and two). If <var class="varname">off</var> is
|
|
specified, the server will not perform disk cache maintenance at a specific
|
|
time of day, however it may perform disk cache maintenance at regular time
|
|
intervals, if a maintenance period is set using the CacheGcInterval directive.
|
|
If <var class="varname">off</var> is specified, and a maintenance period is not specified
|
|
using CacheGcInterval, the server will never perform disk cache maintenance
|
|
(see example three).</p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 1</strong></dt>
|
|
<dd><pre> CacheRoot dataCache
|
|
CacheGcDaily 15:55</pre>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 2</strong></dt>
|
|
<dd><pre>CacheRoot dataCache
|
|
CacheGcDaily 9</pre>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 3</strong></dt>
|
|
<dd><pre>CacheRoot dataCache
|
|
CacheGcDaily off</pre>
|
|
</dd>
|
|
</dl>
|
|
<p>For example one, the server will perform cache maintenance
|
|
every day at 15:55 (or 3:55 pm local system time). For example two, the server
|
|
will perform cache maintenance every day at 9:00 (or 9:00 am local system
|
|
time). For example three, the server will not perform disk cache maintenance
|
|
since CacheGcDaily is set to off, and CacheGcInterval is not specified.</p>
|
|
</blockquote>
|
|
<p>See <a href="#rzaiemod_disk_cache__twodiscmain">Two Phase Disk Cache Maintenance</a> for
|
|
details concerning the disk cache maintenance process.</p>
|
|
<ul><li>Disk cache maintenance may occur at time intervals for CacheGcInterval
|
|
and at a particular time of day for CacheGcDaily if both are set.</li>
|
|
<li>This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheGcDaily directive. For the configuration shown below, garbage collection
|
|
is performed at 1:30 AM and again at 2:30 AM.</div>
|
|
<div class="note"><span class="notetitle">Example:</span> <pre>CacheRoot dataCache
|
|
CacheGcDaily 01:30:00
|
|
<VirtualHost ...>
|
|
CacheGcDaily 02:30 00
|
|
</Virtual Host> </pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachegcinterval"><a name="cachegcinterval"><!-- --></a><h2 class="topictitle2">CacheGcInterval</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheGcInterval <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>: none</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 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>: CacheGcInterval 8100</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheGcInterval directive specifies whether the server is to perform
|
|
disk cache maintenance, at regular time intervals, when the disk cache function
|
|
is enabled. Maintenance for this setting will commence at the time the server
|
|
is started, and repeat every number of specified seconds, until the server
|
|
is ended. If the disk cache function is disabled (the default), this setting
|
|
has no affect and the server does not perform disk cache maintenance.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>period</em></dt>
|
|
<dd><ul><li> The <var class="varname">period</var> parameter specifies a period for cache
|
|
maintenance cycles, in seconds. The value may include a decimal to indicate
|
|
fractional hours. For example, use CacheGcInterval 5400 to perform cache maintenance
|
|
every 5400 seconds (every 90 minutes).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p> If this directive is not used (not specified), the server
|
|
will not perform disk cache maintenance at regular time intervals, however
|
|
it may at a particular time of day, if such a time is specified using the
|
|
CacheGcDaily directive. If this directive is not used (not specified), and
|
|
CacheGcDaily is set to <var class="varname">off</var>, the server will never perform
|
|
disk cache maintenance (see example two).</p>
|
|
<dl><dt class="dlterm"><strong>Example 1</strong></dt>
|
|
<dd><pre>CacheRoot dataCache
|
|
CacheGcInterval 9900</pre>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 2</strong></dt>
|
|
<dd><pre>CacheRoot dataCache
|
|
CacheGcDaily offexample</pre>
|
|
</dd>
|
|
</dl>
|
|
<p>For example one, the server will perform disk cache maintenance
|
|
every 9900 seconds (every 2 hours and 45 minutes), starting from the time
|
|
the server is started. For example two, the server will not perform disk cache
|
|
maintenance since CacheGcDaily is set to off, and CacheGcInterval is not specified.</p>
|
|
</blockquote>
|
|
<p>See <a href="#rzaiemod_disk_cache__twodiscmain">Two Phase Disk Cache Maintenance</a> for
|
|
details concerning the disk cache maintenance process.</p>
|
|
<ul><li>Disk cache maintenance may start at regular time intervals for CacheGcInterval
|
|
and at a particular time of day for CacheGcDaily if both are set.</li>
|
|
<li>This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheGcInterval directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="directiveName"><a name="directiveName"><!-- --></a><h2 class="topictitle2">CacheGcMemUsage</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheGcMemUsage <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>: CacheGcMemUsage 5000000</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>: iSeries</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 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>: CacheGcMemUsage 3000000</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheGcMemUsage directive specifies the maximum amount of system memory,
|
|
in bytes, the server is to use to collect information for phase two of the
|
|
disk cache maintenance process. See Two Phase Disk Cache Maintenance for details
|
|
concerning the disk cache maintenance process.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>size</em></dt>
|
|
<dd><ul><li> The <var class="varname">size</var> parameter specifies, in bytes, the amount
|
|
of main store memory that the server may use for phase two of the disk cache
|
|
maintenance process.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>When the amount of system memory consumed for phase two
|
|
of the disk cache maintenance process reaches the value specified for the
|
|
size parameter, the server stops collecting information for remaining data
|
|
in cache but continues to do the other tasks for phase one until finished.
|
|
If the server takes disk cache maintenance into phase two, only the information
|
|
collected in phase one is used. This will not include information for all
|
|
remaining cached data if the size parameter is not large enough.</p>
|
|
<dl><dt class="dlterm"><strong>Example</strong></dt>
|
|
<dd><pre>CacheRoot dataCache
|
|
CacheGcDaily 5:00
|
|
CacheGcMemUsage 200000</pre>
|
|
<p>For this example, the server will perform
|
|
disk cache maintenance every day at 5:00 (CacheGcDaily 5:00). During phase
|
|
one maintenance, the server records file names and expiration times for data
|
|
remaining cached, until it consumes 200000 bytes of memory (CacheGcMemUsage
|
|
200000). After this limits reached, the server continues to perform the other
|
|
phase one tasks. After all phase one tasks are complete, the server performs
|
|
phase two maintenance (if needed) using whatever information it was able to
|
|
collect in phase one.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<ul><li>This directive is negated when <var class="varname">off</var> is specified for
|
|
CacheGcDaily and CacheGcInterval is not specified.</li>
|
|
<li>Cache maintenance may occur at time intervals for CacheGcInterval and
|
|
at a particular time of day for CacheGcDaily if both are set.</li>
|
|
<li>This directive is used only if CacheRoot is set, and cache maintenance
|
|
is enabled.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheGcMemUsage directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachegcunused"><a name="cachegcunused"><!-- --></a><h2 class="topictitle2">CacheGcUnused</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheGcUnused <var class="varname">hash-key-criteria
|
|
period</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: CacheGcUnused * 1209600 (seconds, or 2
|
|
weeks)</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>: iSeries</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 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>: CacheGcUnused http://www.ibm.com/* 432000</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheGcUnused directive specifies a complete URL or URL match expression
|
|
and a maximum period value used to identify and remove data from cache that
|
|
has not been used (or served from cache) within the number of specified seconds.
|
|
Multiple CacheGcUnused directives are allowed. If disk cache maintenance is
|
|
disabled (see <a href="#cachegcdaily">CacheGcDaily</a> or <a href="#cachegcinterval">CacheGcInterval</a>), this setting has no affect and the cache may grow without
|
|
bound, unless managed by some application or process other than the server
|
|
itself.</p>
|
|
<p>This directive is similar to the <a href="#cachegcclean">CacheGcClean</a> directive,
|
|
however the latter does not distinguish when data was last served from cache,
|
|
but rather when it was last written (or saved) to cache.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter One</strong>: <em>hash-key-criteria</em></dt>
|
|
<dd><ul><li> The <var class="varname">hash-key-criteria</var> parameter accepts a complete
|
|
URL or URL match expression used to identify cache data by hash key. Complete
|
|
URLs do not contain asterisks (*) or question marks (?) and must match hash
|
|
keys completely (see example two). URL match expressions contain one or more
|
|
asterisks (*) or question marks (?) as wildcards to match multiple hash keys.
|
|
For example, <samp class="codeph">http://*</samp> or <samp class="codeph">ftp://server?.ibm.com/*</samp> (see
|
|
example one).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Parameter Two</strong>: <em>period</em></dt>
|
|
<dd><ul><li> The <var class="varname">period</var> parameter specifies the maximum amount
|
|
of time (in seconds) that matched data may remain cached.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>Cached data for the disk caching function is identified
|
|
for this setting by comparing hash keys with the value specified for the hash-key-criteria
|
|
parameter. Matched data that has not been used (or served from cache) within
|
|
the number of seconds specified by the corresponding period parameter are
|
|
discarded by the server during phase one of the disk cache maintenance process.
|
|
Matched data that has been used within the number of specified seconds is
|
|
not affected. Unmatched documents are not affected. See <a href="#rzaiemod_disk_cache__twodiscmain">Two Phase Disk Cache Maintenance</a> for details concerning the disk cache maintenance process.</p>
|
|
<dl><dt class="dlterm"><strong>Example 1</strong>: URL match expressions</dt>
|
|
<dd><pre>CacheRoot serverCache
|
|
CacheGcUnused http://* 25929000
|
|
CacheGcUnused ftp://server?.ibm.com/* 1209600</pre>
|
|
<p> For this example,
|
|
the first CacheGcUnused directive ensures that cached data with hash keys
|
|
(or URLs) that match the expression <samp class="codeph">http://*</samp> and has not
|
|
been updated within the past 25929000 seconds (or 30 days) are discarded during
|
|
phase one of the disk cache maintenance process. The second CacheGcClean directive
|
|
ensures that cached data with hash keys (or URLs) that match the expression <samp class="codeph">ftp://server?.ibm.com/*</samp> and
|
|
has not been updated within the past 1209600 seconds (or 2 weeks) is discarded.
|
|
</p>
|
|
<p>Example one uses CacheGcUnused directives with URL match expressions
|
|
to manage data stored in cache using the disk caching function (CacheRoot
|
|
serverCache). For the expression <samp class="codeph">http://*</samp>, the wildcard (*)
|
|
is used to match one or more characters in hash keys preceding the characters
|
|
http://. This expression matches all hash keys starting with the characters <samp class="codeph">http://</samp>.
|
|
For the expression <samp class="codeph">ftp://server?.ibm.com/*</samp>, the first wildcard
|
|
(?) is used to match any single character in hash keys between <samp class="codeph">ftp://server
|
|
and .ibm.com/</samp>. The second wildcard (*) is used to match one or more
|
|
characters in hash keys succeeding the characters .ibm.com/. Hash keys that
|
|
match this expression, for example, include <sup>ftp://server1.ibm.com/whitepaper.pdf</sup> and <samp class="codeph">ftp://server5.ibm.com/downloads/driver.exe</samp>. </p>
|
|
</dd>
|
|
</dl>
|
|
<dl><dt class="dlterm"><strong>Example 2</strong>: Complete URL</dt>
|
|
<dd><pre>ProxyRequests on
|
|
CacheRoot serverCache
|
|
CacheGcUnused ftp://server5.ibm.com/downloads/application.zip 432000</pre>
|
|
<p>For
|
|
this example, the CacheGcUnused directive uses a complete URL to ensure cached
|
|
data with the hash key <samp class="codeph">ftp://ftpserver.ibm.com/downloads/application.zip</samp> is
|
|
discarded during phase one of the disk cache maintenance process if it has
|
|
not been requested within the past 432000 seconds (or 5 days). No other data
|
|
will be matched since complete URLs identify a single hash key. </p>
|
|
<p>The
|
|
server detects requests for cached data for the disk caching function by comparing
|
|
the "Last access date/time" values of data file attributes. These are commonly
|
|
referred to as last-accessed times. When data is served from cache, the corresponding
|
|
last-accessed times record the date and time that the last request was served.</p>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<ul><li>This directive is negated when off is specified for CacheGcDaily and CacheGcInterval
|
|
is not specified.</li>
|
|
<li>Cache maintenance may occur at regular time periods for CacheGcInterval
|
|
and at a particular time of day for CacheGcDaily if both are set.</li>
|
|
<li>This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheGcUnused directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cacheroot"><a name="cacheroot"><!-- --></a><h2 class="topictitle2">CacheRoot</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheRoot <var class="varname">directory</var></td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Default">Default</a></strong>: none</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 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>: CacheRoot webProxyCache</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>The CacheRoot directive enables the disk cache function and specifies the
|
|
name of the file system directory root. Setting this directive also enables
|
|
disk cache maintenance for the CacheGcDaily directive, by default, and the
|
|
CacheGcInterval directive. See the <a href="#cachegcdaily">CacheGcDaily</a> or <a href="#cachegcinterval">CacheGcInterval</a> directives for more details on
|
|
disk cache maintenance.</p>
|
|
<blockquote><dl><dt class="dlterm"><strong>Parameter</strong>: <em>directory</em></dt>
|
|
<dd><ul><li>The <var class="varname">directory</var> parameter accepts a file system path
|
|
name to specify the file system directory root for the disk cache function
|
|
(see directory root limits below).</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<p>The disk cache function provides underlying cache support
|
|
for a local proxy cache and user written modules, using local file system
|
|
space (disk space). The server must have *RWX data authorities and *ALL object
|
|
authorities to the specified directory. </p>
|
|
<p>A hash algorithm is used to
|
|
generate unique and seemingly random path names based on hash keys (or URLs)
|
|
provided for data stored in cache (see CacheDirLength and CacheDirLevels).
|
|
Data is stored in the local file system using these path names, relative to
|
|
the specified directory root. Since the algorithm generates case sensitive
|
|
path names, CacheRoot must specify a directory within the QOpenSys (case sensitive)
|
|
file system. For this reason the following limits are placed on the directory
|
|
root:</p>
|
|
<dl><dt class="dlterm">Directory root limits:</dt>
|
|
<dd><ul><li>If the directory parameter specifies an absolute path it must start with
|
|
/QOpenSys/QIBM/UserData/HTTPA/CacheRoot, otherwise the proxy will fail to
|
|
activate at startup.</li>
|
|
<li>If the directory parameter does not specify an absolute path (does not
|
|
start with a '/'), it will be assumed to be relative to the following: /QOpenSys/QIBM/UserData/HTTPA/CacheRoot</li>
|
|
</ul>
|
|
<p>The directory will be created if it does not exist prior to server
|
|
startup. Only the last directory in the path will be created. All other directories
|
|
in the path must previously exist. For example, if "CacheRoot abc/def" is
|
|
configured, the server will create directory "/QOpenSys/QIBM/UserData/HTTPA/CacheRoot/ABC/def".</p>
|
|
<div class="note"><span class="notetitle">Example 1:</span> Absolute Path<pre>CacheRoot /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/proxyCache
|
|
ProxyRequests on</pre>
|
|
</div>
|
|
<div class="note"><span class="notetitle">Example 2:</span> Relative
|
|
Path<pre>CacheRoot proxyCache
|
|
ProxyRequests on</pre>
|
|
</div>
|
|
<div class="note"><span class="notetitle">Example 3:</span> Relative
|
|
Path (with disk cache function unavailable for proxy data)<pre>CacheRoot cache
|
|
ProxyRequests on</pre>
|
|
</div>
|
|
<div class="note"><span class="notetitle">Example 4:</span> Bad
|
|
Path<pre>CacheRoot /MyServerCache</pre>
|
|
</div>
|
|
</dd>
|
|
</dl>
|
|
<p>For example one, CacheRoot enables the disk cache function
|
|
(CacheRoot /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/proxyCache) , ProxyRequests
|
|
specifies that the proxy function is enabled to handle forward proxy requests
|
|
(ProxyRequests on). With these directive settings, HTTP proxy response data
|
|
is cached and maintained within the /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/proxyCache
|
|
directory using disk cache function support. See the ProxyRequests directive
|
|
for more information on handling proxy requests and caching HTTP proxy response
|
|
data. </p>
|
|
<p>For example two, the disk cache function is enabled (CacheRoot
|
|
proxyCache), the proxy function is enabled (ProxyRequests on), and the local
|
|
proxy cache is enabled. With these directive settings, HTTP proxy response
|
|
data is cached and maintained within the proxyCache directory, relative to
|
|
the /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/ directory. This directory is
|
|
the same one described in example one, simply specified as a relative path
|
|
name rather than an absolute path name. Either specification is acceptable.
|
|
</p>
|
|
<p>For example three, the disk cache function is enabled (CacheRoot cache),
|
|
and the proxy function is enabled (ProxyRequests on), however the local proxy
|
|
cache is disabled. With these directive settings, the disk cache function
|
|
is not used to cache data for the proxy function, but may be used to cache
|
|
data for user written modules. </p>
|
|
<p>For example four, the directory specified
|
|
for CacheRoot is not valid since an absolute path within /QOpenSys/QIBM/UserData/HTTPA/CacheRoot/
|
|
is not specified. With this configuration the server will generate an error
|
|
message(s) at startup and fail to activate.</p>
|
|
</blockquote>
|
|
<ul><li>This directive is required when ProxyNoConnect is set to on.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheRoot directive.</div>
|
|
</div>
|
|
</div>
|
|
<div class="hr" id="cachesize"><a name="cachesize"><!-- --></a><h2 class="topictitle2">CacheSize</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_disk_cache</td>
|
|
</tr>
|
|
<tr><td colspan="2" valign="top"><strong><a href="rzaiedirective-dict.htm#rzaiedirective-dict__Syntax">Syntax</a></strong>: CacheSize <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>: CacheSize 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:<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>: CacheSize 8550</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p> The CacheSize directive specifies the maximum amount of system storage
|
|
space allocated for the disk cache function (in kilobytes). Although actual
|
|
usage may exceed this setting, the server will discard data when it runs disk
|
|
cache maintenance until the total allocated cache space is at or below this
|
|
setting. If disk cache maintenance is disabled, this setting has no affect
|
|
and the cache may grow without bound, unless managed by some application or
|
|
process other than the server itself. See <a href="#cachegcdaily">CacheGcDaily</a> or <a href="#cachegcinterval">CacheGcInterval</a> for more details on the disk
|
|
cache maintenance process.</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
|
|
kilobytes allocated for the disk cache function. Depending on the expected
|
|
server traffic volume, and values set for CacheGcInterval or CacheGcDaily,
|
|
use a size value that is at least twenty to forty percent lower than the available
|
|
space.</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</blockquote>
|
|
<p>The disk cache function uses the local file system to store data. Therefore,
|
|
space allocated for this cache is used to maintain directory structures and
|
|
file attributes as well as to store cache data. It also includes unused space
|
|
within file system storage blocks allocated to files and directories. Therefore,
|
|
the total amount of system storage allocated for the cache will always be
|
|
greater than the total amount of actual cache data. This setting sets a limit
|
|
for the total amount of allocated space, not a limit for the total amount
|
|
of actual cache data.</p>
|
|
<ul><li>This directive is negated when off is specified for CacheGcDaily and CacheGcInterval
|
|
is not specified.</li>
|
|
<li>This directive is used only if CacheRoot is set.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTTP Server (powered by Apache) does not support inheritance for the
|
|
CacheSize directive.</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |