svn: /phpdoc/en/trunk/reference/wincache/ ini.xml setup.xml
| From: | Ruslan Yakushev | Date: | Thu, 30 Sep 2010 21:53:35 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/wincache/ ini.xml setup.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7180@lists.php.net to get a copy of this message | ||
ruslany Thu, 30 Sep 2010 21:53:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303909
Log:
Updating wincache documentation to include information about functions reroutes.
Changed paths:
U phpdoc/en/trunk/reference/wincache/ini.xml
U phpdoc/en/trunk/reference/wincache/setup.xml
Modified: phpdoc/en/trunk/reference/wincache/ini.xml
===================================================================
--- phpdoc/en/trunk/reference/wincache/ini.xml 2010-09-30 20:40:20 UTC (rev 303908)
+++ phpdoc/en/trunk/reference/wincache/ini.xml 2010-09-30 21:53:35 UTC (rev 303909)
@@ -42,7 +42,7 @@
<entry><link
linkend="ini.wincache.fcachesize">wincache.fcachesize</link></entry>
<entry>"24"</entry>
<entry>"5"</entry>
- <entry>"85"</entry>
+ <entry>"255"</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available since WinCache 1.0.0</entry>
</row>
@@ -158,6 +158,14 @@
<entry>PHP_INI_SYSTEM</entry>
<entry>Available since WinCache 1.1.0</entry>
</row>
+ <row>
+ <entry><link
linkend="ini.wincache.rerouteini">wincache.rerouteini</link></entry>
+ <entry>NULL</entry>
+ <entry>NULL</entry>
+ <entry>NULL</entry>
+ <entry>PHP_INI_SYSTEM</entry>
+ <entry>Available since WinCache 1.2.0</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -401,6 +409,19 @@
</simpara>
</listitem>
</varlistentry>
+ <varlistentry xml:id="ini.wincache.rerouteini">
+ <term>
+ <parameter>wincache.rerouteini</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <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.
+ </simpara>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</section>
Modified: phpdoc/en/trunk/reference/wincache/setup.xml
===================================================================
--- phpdoc/en/trunk/reference/wincache/setup.xml 2010-09-30 20:40:20 UTC (rev 303908)
+++ phpdoc/en/trunk/reference/wincache/setup.xml 2010-09-30 21:53:35 UTC (rev 303909)
@@ -212,6 +212,108 @@
</example>
</para>
</section>
+ <section xml:id="wincache.reroutes">
+ <title>WinCache Functions Reroutes</title>
+ <para>
+ The WinCache functions reroutes (available since WinCache 1.2.0) can be used to replace built-in
PHP functions with their equivalents
+ that are optimized for a particular purpose. WinCache extension includes Windows-optimized
implementation of PHP file functions that
+ may improve performance of PHP applications in cases when PHP has to access files on network
shares. The optimized implementation is
+ provided for the following functions:
+ </para>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <simpara>
+ <link linkend="function.file-exists">file_exists</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.file-get-contents">file_get_contents</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.readfile">readfile</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.is-readable">is_readable</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.is-writable">is_writable</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.is-dir">is_dir</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.realpath">realpath</link>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="function.filesize">filesize</link>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ To configure WinCache to use the functions reroutes use the file
<filename>reroute.ini</filename> that is included in
+ WinCache installation package. Copy this file into the same directory where
<filename>php.ini</filename>
+ file is located. After that add the wincache.rerouteini setting in
<filename>php.ini</filename>
+ and specify an absolute or relative path to the <filename>reroute.ini</filename>
file.
+ <example>
+ <title>Enabling WinCache functions reroutes</title>
+ <programlisting role="php.ini">
+<![CDATA[
+wincache.rerouteini = C:\PHP\reroute.ini
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <note>
+ <simpara>
+ If WinCache functions reroutes are enabled it is recommended to increase the WinCache file
cache size. This
+ can be done by using <link
linkend="ini.wincache.fcachesize">wincache.fcachesize</link> setting.
+ </simpara>
+ </note>
+ <para>
+ The <filename>reroute.ini</filename> file contains the mappings between the native
PHP functions and
+ their equivalents in WinCache. Each line in the file defines a mapping by using the following
syntax:
+ </para>
+ <simpara>
+ <literal><PHP function name>:[<number of function
parameters>]=<wincache function name></literal>
+ </simpara>
+ <para>
+ The example of the file is shown below. In this example the calls to PHP function
<function>file_get_contents</function>
+ will be replaced with calls to <function>wincache_file_get_contents</function> only
if the number of parameters passed to
+ the function is less than or equals to 2. Specifying the number of parameters is useful when
replacement function
+ does not handle all the function's parameters.
+ <example>
+ <title>Reroute.ini file content</title>
+ <programlisting role="php.ini">
+ <![CDATA[
+[FunctionRerouteList]
+file_exists=wincache_file_exists
+file_get_contents:2=wincache_file_get_contents
+readfile:2=wincache_readfile
+is_readable=wincache_is_readable
+is_writable=wincache_is_writable
+is_writeable=wincache_is_writable
+is_file=wincache_is_file
+is_dir=wincache_is_dir
+realpath=wincache_realpath
+filesize=wincache_filesize
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </section>
<section xml:id="wincache.resources">
&reftitle.resources;
&no.resource;