More updates to the wincache documentation.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297997 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ruslan Yakushev 2010-04-14 18:34:50 +00:00
parent 5a3b9ab969
commit f105e870fd
12 changed files with 277 additions and 12 deletions

View file

@ -11,12 +11,28 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>wincache_fcache_fileinfo</methodname>
<void/>
<methodparam choice="opt"><type>bool</type><parameter>summaryonly</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
Retrieves information about file cache content and its usage.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>summaryonly</parameter></term>
<listitem>
<para>
Controls whether the returned array will contain information about individual cache entries
along with the file cache summary.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@ -140,6 +156,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -98,6 +98,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -11,12 +11,28 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>wincache_ocache_fileinfo</methodname>
<void/>
<methodparam choice="opt"><type>bool</type><parameter>summaryonly</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
Retrieves information about opcode cache content and its usage.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>summaryonly</parameter></term>
<listitem>
<para>
Controls whether the returned array will contain information about individual cache entries
along with the opcode cache summary.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@ -153,6 +169,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -98,6 +98,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -103,6 +103,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -98,6 +98,7 @@ Array
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 295806 $ -->
<refentry xml:id="function.wincache-scache-info" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>wincache_scache_info</refname>
<refpurpose>
Retrieves information about files cached in the session cache
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>wincache_scache_info</methodname>
<methodparam choice="opt"><type>bool</type><parameter>summaryonly</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
Retrieves information about session cache content and its usage.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>summaryonly</parameter></term>
<listitem>
<para>
Controls whether the returned array will contain information about individual cache entries
along with the session cache summary.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Array of meta data about session cache &return.falseforfailure;
</para>
<para>
The array returned by this function contains the following elements:
<itemizedlist spacing="compact">
<listitem>
<simpara>
<literal>total_cache_uptime</literal> - total time in seconds that the session cache has been active
</simpara>
</listitem>
<listitem>
<simpara>
<literal>total_item_count</literal> - total number of elements that are currently in the session cache
</simpara>
</listitem>
<listitem>
<simpara>
<literal>is_local_cache</literal> - true is the cache metadata is for a local cache instance,
false if the metadata is for the global cache
</simpara>
</listitem>
<listitem>
<simpara>
<literal>total_hit_count</literal> - number of times the data has been served from the cache
</simpara>
</listitem>
<listitem>
<simpara>
<literal>total_miss_count</literal> - number of times the data has not been found in the cache
</simpara>
</listitem>
<listitem>
<para>
<literal>scache_entries</literal> - an array that contains the information about all the cached items:
<itemizedlist spacing="compact">
<listitem>
<simpara>
<literal>key_name</literal> - name of the key which is used to store the data
</simpara>
</listitem>
<listitem>
<simpara>
<literal>value_type</literal> - type of value stored by the key
</simpara>
</listitem>
<listitem>
<simpara>
<literal>use_time</literal> - time in seconds since the file has been accessed in the opcode cache
</simpara>
</listitem>
<listitem>
<simpara>
<literal>last_check</literal> - time in seconds since the file has been checked for modifications
</simpara>
</listitem>
<listitem>
<simpara>
<literal>ttl_seconds</literal> - time remaining for the data to live in the cache, 0 meaning infinite
</simpara>
</listitem>
<listitem>
<simpara>
<literal>age_seconds</literal> - time elapsed from the time data has been added in the cache
</simpara>
</listitem>
<listitem>
<simpara>
<literal>hitcount</literal> - number of times data has been served from the cache
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>wincache_scache_info</function> example</title>
<programlisting role="php">
<![CDATA[
<pre>
<?php
print_r(wincache_scache_info());
?>
</pre>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[total_cache_uptime] => 17357
[total_file_count] => 121
[total_hit_count] => 36562
[total_miss_count] => 201
[scache_entries] => Array
(
[1] => Array
(
[file_name] => c:\inetpub\wwwroot\checkcache.php
[add_time] => 17356
[use_time] => 7
[last_check] => 10
[hit_count] => 454
[function_count] => 0
[class_count] => 1
)
[2] => Array (...iterates for each cached file)
)
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>wincache_fcache_fileinfo</function></member>
<member><function>wincache_fcache_meminfo</function></member>
<member><function>wincache_ocache_meminfo</function></member>
<member><function>wincache_rplist_fileinfo</function></member>
<member><function>wincache_rplist_meminfo</function></member>
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_ucache_info</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -10,13 +10,40 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>wincache_ucache_info</methodname>
<void/>
<type>array</type><methodname>wincache_ucache_info</methodname>
<methodparam choice="opt"><type>bool</type><parameter>summaryonly</parameter><initializer>false</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Retrieves information about data stored in the user cache.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>summaryonly</parameter></term>
<listitem>
<para>
Controls whether the returned array will contain information about individual cache entries
along with the user cache summary.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<para>
The key of an entry in the user cache. If specified then the returned array will contain information
only about that cache entry. If not specified and <parameter>summaryonly</parameter> is set to
<literal>false</literal> then the returned array will contain information about all entries in the cache.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@ -156,6 +183,7 @@ Array
<member><function>wincache_rplist_fileinfo</function></member>
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_meminfo</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -4,7 +4,7 @@
<refnamediv>
<refname>wincache_lock</refname>
<refpurpose>
Gets an exclusive lock on a given key
Acquires an exclusive lock on a given key
</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -76,7 +76,7 @@ fclose($fp);
&reftitle.seealso;
<para>
<simplelist>
<member><function>wincache_ucache_unlock</function></member>
<member><function>wincache_unlock</function></member>
<member><function>wincache_ucache_set</function></member>
<member><function>wincache_ucache_get</function></member>
<member><function>wincache_ucache_delete</function></member>

View file

@ -97,6 +97,7 @@ Array
<member><function>wincache_rplist_meminfo</function></member>
<member><function>wincache_refresh_if_changed</function></member>
<member><function>wincache_ucache_info</function></member>
<member><function>wincache_scache_info</function></member>
</simplelist>
</para>
</refsect1>

View file

@ -4,7 +4,7 @@
<refnamediv>
<refname>wincache_unlock</refname>
<refpurpose>
Removes an exclusive lock on a given key
Releases an exclusive lock on a given key
</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Removes an exclusive lock that was obtained on a given key by using <function>wincache_lock</function>.
Releases an exclusive lock that was obtained on a given key by using <function>wincache_lock</function>.
If any other process was blocked waiting for the lock on this key, that process will be able to obtain
the lock.
</para>
@ -57,7 +57,7 @@
<![CDATA[
<?php
$fp = fopen("/tmp/lock.txt", "r+");
if (wincache_unlock(“lock_txt_lock”)) { // do an exclusive lock
if (wincache_lock(“lock_txt_lock”)) { // do an exclusive lock
ftruncate($fp, 0); // truncate file
fwrite($fp, "Write something here\n");
wincache_unlock(“lock_txt_lock”); // release the lock
@ -76,7 +76,7 @@ fclose($fp);
&reftitle.seealso;
<para>
<simplelist>
<member><function>wincache_ucache_lock</function></member>
<member><function>wincache_lock</function></member>
<member><function>wincache_ucache_set</function></member>
<member><function>wincache_ucache_get</function></member>
<member><function>wincache_ucache_delete</function></member>

View file

@ -344,14 +344,15 @@ wincache.ignorelist = "index.php|misc.php|admin.php"
<varlistentry xml:id="ini.wincache.namesalt">
<term>
<parameter>wincache.namesalt</parameter>
<type>boolean</type>
<type>string</type>
</term>
<listitem>
<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.
an IIS worker process tries to access shared memory. The length of
the namesalt string cannot exceed 8 characters.
</simpara>
</listitem>
</varlistentry>