<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Runtime Configuration</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="wincache.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="wincache.stats.html">WinCache Statistics Script</a></div> <div class="up"><a href="wincache.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="wincache.configuration" class="section"> <h2 class="title">Runtime Configuration</h2> <p class="simpara"> The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>. </p> <p class="para"> The following table lists and explains the configuration settings provided by the WinCache extension: </p> <p class="para"> <table class="doctable table"> <caption><strong>WinCache configuration options</strong></caption> <thead> <tr> <th>Name</th> <th>Default</th> <th>Minimum</th> <th>Maximum</th> <th>Changeable</th> <th>Changelog</th> </tr> </thead> <tbody class="tbody"> <tr> <td><a href="wincache.configuration.html#ini.wincache.fcenabled" class="link">wincache.fcenabled</a></td> <td>"1"</td> <td>"0"</td> <td>"1"</td> <td>PHP_INI_ALL</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.fcenabledfilter" class="link">wincache.fcenabledfilter</a></td> <td>"NULL"</td> <td>"NULL"</td> <td>"NULL"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.fcachesize" class="link">wincache.fcachesize</a></td> <td>"24"</td> <td>"5"</td> <td>"255"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.fcndetect" class="link">wincache.fcndetect</a></td> <td>"1"</td> <td>"0"</td> <td>"1"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.1.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.maxfilesize" class="link">wincache.maxfilesize</a></td> <td>"256"</td> <td>"10"</td> <td>"2048"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ocenabled" class="link">wincache.ocenabled</a></td> <td>"1"</td> <td>"0"</td> <td>"1"</td> <td>PHP_INI_ALL</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ocenabledfilter" class="link">wincache.ocenabledfilter</a></td> <td>"NULL"</td> <td>"NULL"</td> <td>"NULL"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ocachesize" class="link">wincache.ocachesize</a></td> <td>"96"</td> <td>"15"</td> <td>"255"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.filecount" class="link">wincache.filecount</a></td> <td>"4096"</td> <td>"1024"</td> <td>"16384"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.chkinterval" class="link">wincache.chkinterval</a></td> <td>"30"</td> <td>"0"</td> <td>"300"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ttlmax" class="link">wincache.ttlmax</a></td> <td>"1200"</td> <td>"0"</td> <td>"7200"</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.enablecli" class="link">wincache.enablecli</a></td> <td>0</td> <td>0</td> <td>1</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ignorelist" class="link">wincache.ignorelist</a></td> <td>NULL</td> <td>NULL</td> <td>NULL</td> <td>PHP_INI_ALL</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.namesalt</a></td> <td>NULL</td> <td>NULL</td> <td>NULL</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.0.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.ucenabled" class="link">wincache.ucenabled</a></td> <td>1</td> <td>0</td> <td>1</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.1.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.ucachesize</a></td> <td>8</td> <td>5</td> <td>85</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.1.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.namesalt" class="link">wincache.scachesize</a></td> <td>8</td> <td>5</td> <td>85</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.1.0</td> </tr> <tr> <td><a href="wincache.configuration.html#ini.wincache.rerouteini" class="link">wincache.rerouteini</a></td> <td>NULL</td> <td>NULL</td> <td>NULL</td> <td>PHP_INI_SYSTEM</td> <td>Available since WinCache 1.2.0</td> </tr> </tbody> </table> For further details and definitions of the PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>. </p> <p class="para">Here's a short explanation of the configuration directives.</p> <p class="para"> <dl> <dt id="ini.wincache.fcenabled"> <span class="term"> <em><code class="parameter">wincache.fcenabled</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <span class="simpara">Enables or disables the file cache functionality.</span> </dd> </dt> <dt id="ini.wincache.fcenabledfilter"> <span class="term"> <em><code class="parameter">wincache.fcenabledfilter</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <span class="simpara"> Defines a comma-separated list of IIS web site identifiers where file cache should be enabled or disabled. This setting works in conjunction with <em>wincache.fcenabled</em>: if <em>wincache.fcenabled</em> is set to 1, then the sites listed in the <em>wincache.fcenabledfilter</em> will have the file cache turned off; if <em>wincache.fcenabled</em> is set to 0, then the sites listed in the <em>wincache.fcenabledfilter</em> will have the file cache turned on. </span> </dd> </dt> <dt id="ini.wincache.fcachesize"> <span class="term"> <em><code class="parameter">wincache.fcachesize</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum memory size (in megabytes) that is allocated for the file cache. If the total size of all the cached files exceeds the value specified in this setting, then most stale files will be removed from the file cache. </span> </dd> </dt> <dt id="ini.wincache.fcndetect"> <span class="term"> <em><code class="parameter">wincache.fcndetect</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <span class="simpara"> Enables or disables the file change notification detection functionality. If file change notification is supported then it will be used to refresh the opcode and file cache entries as soon as the corresponding files are modified on a file system. If file change notification is not supported, for example when using network file shares, then wincache will poll for file changes at regular time intervals specified by <em>wincache.chkinterval</em>. </span> </dd> </dt> <dt id="ini.wincache.maxfilesize"> <span class="term"> <em><code class="parameter">wincache.maxfilesize</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum allowed size (in kilobytes) for a single file to be cached. If a file size exceeds the specified value, the file will not be cached. This setting applies to the file cache only. </span> </dd> </dt> <dt id="ini.wincache.ocenabled"> <span class="term"> <em><code class="parameter">wincache.ocenabled</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <span class="simpara">Enables or disables the opcode cache functionality</span> </dd> </dt> <dt id="ini.wincache.ocenabledfilter"> <span class="term"> <em><code class="parameter">wincache.ocenabledfilter</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <span class="simpara"> Defines a comma-separated list of IIS web site identifiers where opcode cache should be enabled or disabled. This setting works in conjunction with <em>wincache.ocenabled</em>: if <em>wincache.ocenabled</em> is set to 1, then the sites listed in the <em>wincache.ocenabledfilter</em> will have the opcode cache turned off; if <em>wincache.ocenabled</em> is set to 0, then the sites listed in the <em>wincache.ocenabledfilter</em> will have the opcode cache turned on. </span> </dd> </dt> <dt id="ini.wincache.ocachesize"> <span class="term"> <em><code class="parameter">wincache.ocachesize</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum memory size (in megabytes) that is allocated for the opcode cache. If the cached opcode size exceeds the specified value, then most stale opcode will be removed from the cache. Note that the opcode cache size must be at least 3 times bigger than file cache size. If that is not the case the opcode cache size will be automatically increased. </span> </dd> </dt> <dt id="ini.wincache.filecount"> <span class="term"> <em><code class="parameter">wincache.filecount</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines how many files are expected to be cached by the extension, so that appropriate memory size is allocated at the startup time. If the number of files exceeds the specified value, the WinCache will re-allocate more memory as needed. </span> </dd> </dt> <dt id="ini.wincache.chkinterval"> <span class="term"> <em><code class="parameter">wincache.chkinterval</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines how often (in seconds) the extension checks for file changes in order to refresh the cache. Setting it to 0 will disable the refreshing of the cache. The file changes will not be reflected in the cache unless the cache entry for that file is removed by scavenger or IIS application pool is recycled or wincache_refresh_if_changed function is called. </span> </dd> </dt> <dt id="ini.wincache.ttlmax"> <span class="term"> <em><code class="parameter">wincache.ttlmax</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum time to live (in seconds) for a cached entry without being used. Setting it to 0 will disable the cache scavenger, so the cached entries will never be removed from the cache during the lifetime of the IIS worker process. </span> </dd> </dt> <dt id="ini.wincache.enablecli"> <span class="term"> <em><code class="parameter">wincache.enablecli</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <span class="simpara"> Defines if caching is enabled when PHP is running in command line (CLI) mode. </span> </dd> </dt> <dt id="ini.wincache.ignorelist"> <span class="term"> <em><code class="parameter">wincache.ignorelist</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <p class="para"> Defines a list of files that should not be cached by the extension. The files list is specified by using file names only, separated by the pipe symbol - "|". <div class="example" id="example-554"> <p><strong>Example #1 <em>wincache.ignorelist</em> example</strong></p> <div class="example-contents"> <div class="inicode"><pre class="inicode">wincache.ignorelist = "index.php|misc.php|admin.php"</pre> </div> </div> </div> </p> </dd> </dt> <dt id="ini.wincache.namesalt"> <span class="term"> <em><code class="parameter">wincache.namesalt</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <span class="simpara"> Defines a string that will be used when naming the extension specific objects that are stored in shared memory. This is used to avoid conflicts that may be caused if other applications within an IIS worker process tries to access shared memory. The length of the namesalt string cannot exceed 8 characters. </span> </dd> </dt> <dt id="ini.wincache.ucenabled"> <span class="term"> <em><code class="parameter">wincache.ucenabled</code></em> <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span> </span> <dd> <span class="simpara"> Enables or disables the user cache functionality. </span> </dd> </dt> <dt id="ini.wincache.ucachesize"> <span class="term"> <em><code class="parameter">wincache.ucachesize</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum memory size in megabytes that is allocated for the user cache. If the total size of variables stored in the user cache exceeds the specified value, then the most stale variables will be removed from the cache. </span> </dd> </dt> <dt id="ini.wincache.scachesize"> <span class="term"> <em><code class="parameter">wincache.scachesize</code></em> <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> </span> <dd> <span class="simpara"> Defines the maximum memory size in megabytes that is allocated for the session cache. If the total size of data stored in the session cache exceeds the specified value, then the most stale data will be removed from the cache. </span> </dd> </dt> <dt id="ini.wincache.rerouteini"> <span class="term"> <em><code class="parameter">wincache.rerouteini</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <span class="simpara"> Specifies an absolute or a relateve path to the reroute.ini file that contains the list of PHP functions whose implementation should be replaced with the WinCache function equivalents. If a relative path is specified then it is assumed to be relative to the location of php-cgi.exe file. </span> </dd> </dt> </dl> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="wincache.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="wincache.stats.html">WinCache Statistics Script</a></div> <div class="up"><a href="wincache.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>