mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Initial import of APCu documentation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338141 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3af870e574
commit
790aac9296
28 changed files with 3648 additions and 0 deletions
77
reference/apcu/apcuiterator.xml
Normal file
77
reference/apcu/apcuiterator.xml
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 330310 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.apcuiterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The APCUIterator class</title>
|
||||
<titleabbrev>APCUIterator</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ APCUIterator intro -->
|
||||
<section xml:id="apcuiterator.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The <classname>APCUIterator</classname> class makes it easier to iterate
|
||||
over large APCu caches. This is helpful as it allows iterating over large
|
||||
caches in steps, while grabbing a defined number of entries per lock instance,
|
||||
so it frees the cache locks for other activities rather than hold up the
|
||||
entire cache to grab 100 (the default) entries. Also, using regular expression
|
||||
matching is more efficient as it's been moved to the C level.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="apcuiterator.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>APCUIterator</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>APCUIterator</classname>
|
||||
</ooclass>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Iterator</interfacename>
|
||||
</oointerface>
|
||||
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.apcuiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.apcu.entities.apcuiterator;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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
|
||||
-->
|
133
reference/apcu/apcuiterator/construct.xml
Normal file
133
reference/apcu/apcuiterator/construct.xml
Normal file
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331388 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::__construct</refname>
|
||||
<refpurpose>Constructs an APCUIterator iterator object</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <methodname>APCUIterator::__construct</methodname>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>search</parameter><initializer>null</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>APC_ITER_ALL</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter><initializer>100</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>list</parameter><initializer>APC_LIST_ACTIVE</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Constructs an <classname>APCUIterator</classname> <type>object</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>cache</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The cache type, which will be <literal>user</literal> or
|
||||
<literal>file</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>search</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <link linkend="book.pcre">PCRE</link> regular expression that
|
||||
matches against APC key names, either as a <type>string</type> for
|
||||
a single regular expression, or as an <type>array</type> of regular
|
||||
expressions. Or, optionally pass in &null; to skip the search.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The desired format, as configured with one or more of the
|
||||
<link linkend="apc.constants">APC_ITER_*</link> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>chunk_size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The chunk size. Must be a value greater than 0. The default
|
||||
value is 100.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>list</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type to list. Either pass in <constant>APC_LIST_ACTIVE</constant>
|
||||
or <constant>APC_LIST_DELETED</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An <classname>APCUIterator</classname> <type>object</type> on success,
|
||||
or &null; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>APCUIterator::__construct</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
foreach (new APCUIterator('user', '/^counter\./') as $counter) {
|
||||
echo "$counter[key]: $counter[value]\n";
|
||||
apc_dec($counter['key'], $counter['value']);
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apc_exists</function></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
63
reference/apcu/apcuiterator/current.xml
Normal file
63
reference/apcu/apcuiterator/current.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.current" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::current</refname>
|
||||
<refpurpose>Get current item</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>mixed</type><methodname>APCUIterator::current</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the current item from the <classname>APCUIterator</classname> stack.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current item on success, or &false; if no
|
||||
more items or exist, or on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::next</methodname></member>
|
||||
<member><methodname>Iterator::current</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
66
reference/apcu/apcuiterator/gettotalcount.xml
Normal file
66
reference/apcu/apcuiterator/gettotalcount.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 308219 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.gettotalcount" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::getTotalCount</refname>
|
||||
<refpurpose>Get total count</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>APCUIterator::getTotalCount</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get the total count.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The total count.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::getTotalHits</methodname></member>
|
||||
<member><methodname>APCUIterator::getTotalSize</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
66
reference/apcu/apcuiterator/gettotalhits.xml
Normal file
66
reference/apcu/apcuiterator/gettotalhits.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 308219 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.gettotalhits" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::getTotalHits</refname>
|
||||
<refpurpose>Get total cache hits</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>APCUIterator::getTotalHits</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the total number of cache hits.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The number of hits on success, or &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::getTotalCount</methodname></member>
|
||||
<member><methodname>APCUIterator::getTotalSize</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
66
reference/apcu/apcuiterator/gettotalsize.xml
Normal file
66
reference/apcu/apcuiterator/gettotalsize.xml
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.gettotalsize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::getTotalSize</refname>
|
||||
<refpurpose>Get total cache size</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>int</type><methodname>APCUIterator::getTotalSize</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the total cache size.
|
||||
</para>
|
||||
|
||||
&warn.undocumented.func;
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The total cache size.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::getTotalCount</methodname></member>
|
||||
<member><methodname>APCUIterator::getTotalHits</methodname></member>
|
||||
<member><function>apc_cache_info</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
62
reference/apcu/apcuiterator/key.xml
Normal file
62
reference/apcu/apcuiterator/key.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.key" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::key</refname>
|
||||
<refpurpose>Get iterator key</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>APCUIterator::key</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the current iterator key.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the key on success, or &false; upon failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::current</methodname></member>
|
||||
<member><methodname>Iterator::key</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
63
reference/apcu/apcuiterator/next.xml
Normal file
63
reference/apcu/apcuiterator/next.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.next" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::next</refname>
|
||||
<refpurpose>Move pointer to next item</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCUIterator::next</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Moves the iterator pointer to the next element.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::current</methodname></member>
|
||||
<member><methodname>APCUIterator::rewind</methodname></member>
|
||||
<member><methodname>Iterator::next</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
62
reference/apcu/apcuiterator/rewind.xml
Normal file
62
reference/apcu/apcuiterator/rewind.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.rewind" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::rewind</refname>
|
||||
<refpurpose>Rewinds iterator</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCUIterator::rewind</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Rewinds back the iterator to the first element.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::next</methodname></member>
|
||||
<member><methodname>Iterator::next</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
62
reference/apcu/apcuiterator/valid.xml
Normal file
62
reference/apcu/apcuiterator/valid.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="apcuiterator.valid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>APCUIterator::valid</refname>
|
||||
<refpurpose>Checks if current position is valid</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>void</type><methodname>APCUIterator::valid</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks if the current iterator position is valid.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the current iterator position is valid, otherwise &false;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>APCUIterator::current</methodname></member>
|
||||
<member><methodname>Iterator::valid</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
42
reference/apcu/book.xml
Normal file
42
reference/apcu/book.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 330340 $ -->
|
||||
|
||||
<book xml:id="book.apcu" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>APC User Cache</title>
|
||||
<titleabbrev>APCu</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.apcu">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
APCu is APC stripped of opcode caching.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
&reference.apcu.setup;
|
||||
&reference.apcu.constants;
|
||||
&reference.apcu.reference;
|
||||
&reference.apcu.apcuiterator;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
242
reference/apcu/constants.xml
Normal file
242
reference/apcu/constants.xml
Normal file
|
@ -0,0 +1,242 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 323624 $ -->
|
||||
|
||||
<appendix xml:id="apcu.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="constant.apcu-iter-all">
|
||||
<term>
|
||||
<constant>APC_ITER_ALL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-atime">
|
||||
<term>
|
||||
<constant>APC_ITER_ATIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-ctime">
|
||||
<term>
|
||||
<constant>APC_ITER_CTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-device">
|
||||
<term>
|
||||
<constant>APC_ITER_DEVICE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-dtime">
|
||||
<term>
|
||||
<constant>APC_ITER_DTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-filename">
|
||||
<term>
|
||||
<constant>APC_ITER_FILENAME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-inode">
|
||||
<term>
|
||||
<constant>APC_ITER_INODE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-key">
|
||||
<term>
|
||||
<constant>APC_ITER_KEY</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-md5">
|
||||
<term>
|
||||
<constant>APC_ITER_MD5</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-mem-size">
|
||||
<term>
|
||||
<constant>APC_ITER_MEM_SIZE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-mtime">
|
||||
<term>
|
||||
<constant>APC_ITER_MTIME</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-none">
|
||||
<term>
|
||||
<constant>APC_ITER_NONE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-num-hits">
|
||||
<term>
|
||||
<constant>APC_ITER_NUM_HITS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-refcount">
|
||||
<term>
|
||||
<constant>APC_ITER_REFCOUNT</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-ttl">
|
||||
<term>
|
||||
<constant>APC_ITER_TTL</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-type">
|
||||
<term>
|
||||
<constant>APC_ITER_TYPE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-iter-value">
|
||||
<term>
|
||||
<constant>APC_ITER_VALUE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-list-active">
|
||||
<term>
|
||||
<constant>APC_LIST_ACTIVE</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.apcu-list-deleted">
|
||||
<term>
|
||||
<constant>APC_LIST_DELETED</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
-->
|
156
reference/apcu/functions/apcu-add.xml
Normal file
156
reference/apcu/functions/apcu-add.xml
Normal file
|
@ -0,0 +1,156 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331388 $ -->
|
||||
<refentry xml:id="function.apcu-add" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_add</refname>
|
||||
<refpurpose>
|
||||
Cache a new variable in the data store
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apcu_add</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>apcu_add</methodname>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>unused</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Caches a variable in the data store, only if it's not already stored.
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
Unlike many other mechanisms in PHP, variables stored using
|
||||
<function>apcu_add</function> will persist between requests (until the
|
||||
value is removed from the cache).
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Store the variable using this name. <parameter>key</parameter>s are
|
||||
cache-unique, so attempting to use <function>apcu_add</function> to
|
||||
store data with a key that already exists will not overwrite the
|
||||
existing data, and will instead return &false;. (This is the only
|
||||
difference between <function>apcu_add</function> and
|
||||
<function>apcu_store</function>.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ttl</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Time To Live; store <parameter>var</parameter> in the cache for
|
||||
<parameter>ttl</parameter> seconds. After the
|
||||
<parameter>ttl</parameter> has passed, the stored variable will be
|
||||
expunged from the cache (on the next request). If no <parameter>ttl</parameter>
|
||||
is supplied (or if the <parameter>ttl</parameter> is
|
||||
<literal>0</literal>), the value will persist until it is removed from
|
||||
the cache manually, or otherwise fails to exist in the cache (clear,
|
||||
restart, etc.).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Names in key, variables in value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns TRUE if something has effectively been added into the cache, FALSE otherwise.
|
||||
Second syntax returns array with error keys.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_add</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$bar = 'BAR';
|
||||
apcu_add('foo', $bar);
|
||||
var_dump(apcu_fetch('foo'));
|
||||
echo "\n";
|
||||
$bar = 'NEVER GETS SET';
|
||||
apcu_add('foo', $bar);
|
||||
var_dump(apcu_fetch('foo'));
|
||||
echo "\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(3) "BAR"
|
||||
string(3) "BAR"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_store</function></member>
|
||||
<member><function>apcu_fetch</function></member>
|
||||
<member><function>apcu_delete</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
|
||||
-->
|
162
reference/apcu/functions/apcu-cache-info.xml
Normal file
162
reference/apcu/functions/apcu-cache-info.xml
Normal file
|
@ -0,0 +1,162 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331388 $ -->
|
||||
<refentry xml:id="function.apcu-cache-info" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_cache_info</refname>
|
||||
<refpurpose>
|
||||
Retrieves cached information from APCu's data store
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>apcu_cache_info</methodname>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>limited</parameter><initializer>false</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retrieves cached information and meta-data from APC's data store.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>limited</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>limited</parameter> is &true;, the
|
||||
return value will exclude the individual list of cache entries. This
|
||||
is useful when trying to optimize calls for statistics gathering.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Array of cached data (and meta-data)&return.falseforfailure;
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
<function>apcu_cache_info</function> will raise a warning if it is unable to
|
||||
retrieve APC cache data. This typically occurs when APC is not enabled.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>3.0.11</entry>
|
||||
<entry>
|
||||
The <parameter>limited</parameter> parameter was introduced.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>3.0.16</entry>
|
||||
<entry>
|
||||
The "<literal>filehits</literal>" option for the
|
||||
<parameter>cache_type</parameter> parameter was introduced.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_cache_info</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(apcu_cache_info());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[num_slots] => 2000
|
||||
[ttl] => 0
|
||||
[num_hits] => 9
|
||||
[num_misses] => 3
|
||||
[start_time] => 1123958803
|
||||
[cache_list] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[filename] => /path/to/apcu_test.php
|
||||
[device] => 29954
|
||||
[inode] => 1130511
|
||||
[type] => file
|
||||
[num_hits] => 1
|
||||
[mtime] => 1123960686
|
||||
[creation_time] => 1123960696
|
||||
[deletion_time] => 0
|
||||
[access_time] => 1123962864
|
||||
[ref_count] => 1
|
||||
[mem_size] => 677
|
||||
)
|
||||
[1] => Array (...iterates for each cached file)
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><link linkend="apcu.configuration">APCu configuration directives</link></member>
|
||||
<member><methodname>APCUIterator::getTotalSize</methodname></member>
|
||||
<member><methodname>APCUIterator::getTotalHits</methodname></member>
|
||||
<member><methodname>APCUIterator::getTotalCount</methodname></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
|
||||
-->
|
130
reference/apcu/functions/apcu-cas.xml
Normal file
130
reference/apcu/functions/apcu-cas.xml
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 308219 $ -->
|
||||
|
||||
<refentry xml:id="function.apcu-cas" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apcu_cas</refname>
|
||||
<refpurpose>Updates an old value with a new value</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apcu_cas</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>old</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>new</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>apcu_cas</function> updates an already existing integer value if the
|
||||
<parameter>old</parameter> parameter matches the currently stored value
|
||||
with the value of the <parameter>new</parameter> parameter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of the value being updated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>old</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The old value (the value currently stored).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>new</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new value to update to.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apcu_cas</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
apcu_store('foobar', 2);
|
||||
echo '$foobar = 2', PHP_EOL;
|
||||
echo '$foobar == 1 ? 2 : 1 = ', (apcu_cas('foobar', 1, 2) ? 'ok' : 'fail'), PHP_EOL;
|
||||
echo '$foobar == 2 ? 1 : 2 = ', (apcu_cas('foobar', 2, 1) ? 'ok' : 'fail'), PHP_EOL;
|
||||
|
||||
echo '$foobar = ', apcu_fetch('foobar'), PHP_EOL;
|
||||
|
||||
echo '$f__bar == 1 ? 2 : 1 = ', (apcu_cas('f__bar', 1, 2) ? 'ok' : 'fail'), PHP_EOL;
|
||||
|
||||
apcu_store('perfection', 'xyz');
|
||||
echo '$perfection == 2 ? 1 : 2 = ', (apcu_cas('perfection', 2, 1) ? 'ok' : 'epic fail'), PHP_EOL;
|
||||
|
||||
echo '$foobar = ', apcu_fetch('foobar'), PHP_EOL;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
$foobar = 2
|
||||
$foobar == 1 ? 2 : 1 = fail
|
||||
$foobar == 2 ? 1 : 2 = ok
|
||||
$foobar = 1
|
||||
$f__bar == 1 ? 2 : 1 = fail
|
||||
$perfection == 2 ? 1 : 2 = epic fail
|
||||
$foobar = 1
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apcu_dec</function></member>
|
||||
<member><function>apcu_store</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
63
reference/apcu/functions/apcu-clear-cache.xml
Normal file
63
reference/apcu/functions/apcu-clear-cache.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 332012 $ -->
|
||||
<refentry xml:id="function.apcu-clear-cache" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_clear_cache</refname>
|
||||
<refpurpose>
|
||||
Clears the APCu cache
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apcu_clear_cache</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Clears the cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; always
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_cache_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
|
||||
-->
|
139
reference/apcu/functions/apcu-dec.xml
Normal file
139
reference/apcu/functions/apcu-dec.xml
Normal file
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299860 $ -->
|
||||
|
||||
<refentry xml:id="function.apcu-dec" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apcu_dec</refname>
|
||||
<refpurpose>Decrease a stored number</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apcu_dec</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>step</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter role="reference">success</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Decreases a stored integer value.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of the value being decreased.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>step</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The step, or value to decrease.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>success</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally pass the success or fail boolean value to
|
||||
this referenced variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current value of <parameter>key</parameter>'s value on success,
|
||||
&return.falseforfailure;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apcu_dec</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo "Let's do something with success", PHP_EOL;
|
||||
|
||||
apcu_store('anumber', 42);
|
||||
|
||||
echo apcu_fetch('anumber'), PHP_EOL;
|
||||
|
||||
echo apcu_dec('anumber'), PHP_EOL;
|
||||
echo apcu_dec('anumber', 10), PHP_EOL;
|
||||
echo apcu_dec('anumber', 10, $success), PHP_EOL;
|
||||
|
||||
var_dump($success);
|
||||
|
||||
echo "Now, let's fail", PHP_EOL, PHP_EOL;
|
||||
|
||||
apcu_store('astring', 'foo');
|
||||
|
||||
$ret = apcu_dec('astring', 1, $fail);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($fail);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Let's do something with success
|
||||
42
|
||||
41
|
||||
31
|
||||
21
|
||||
bool(true)
|
||||
|
||||
Now, let's fail
|
||||
bool(false)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apcu_inc</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
93
reference/apcu/functions/apcu-delete.xml
Normal file
93
reference/apcu/functions/apcu-delete.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 308219 $ -->
|
||||
<refentry xml:id="function.apcu-delete" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_delete</refname>
|
||||
<refpurpose>
|
||||
Removes a stored variable from the cache
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apcu_delete</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Removes a stored variable from the cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>key</parameter> used to store the value (with
|
||||
<function>apcu_store</function>).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_delete</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$bar = 'BAR';
|
||||
apcu_store('foo', $bar);
|
||||
apcu_delete('foo');
|
||||
// this is obviously useless in this form
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_store</function></member>
|
||||
<member><function>apcu_fetch</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
|
||||
-->
|
158
reference/apcu/functions/apcu-entry.xml
Normal file
158
reference/apcu/functions/apcu-entry.xml
Normal file
|
@ -0,0 +1,158 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331388 $ -->
|
||||
<refentry xml:id="function.apcu-entry" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_entry</refname>
|
||||
<refpurpose>
|
||||
Atomically fetch or generate a cache entry
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apcu_entry</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>callable</type><parameter>generator</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Atomically attempts to find <parameter>key</parameter> in the cache, it if cannot be found <parameter>generator</parameter>
|
||||
is called, passing <parameter>key</parameter> as the only argument. The return value of the call is then cached with the optionally specified
|
||||
<parameter>ttl</parameter>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Identity of cache entry
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>generator</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A callable that accepts <parameter>key</parameter> as the only argument and returns the value to cache.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ttl</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Time To Live; store <parameter>var</parameter> in the cache for
|
||||
<parameter>ttl</parameter> seconds. After the
|
||||
<parameter>ttl</parameter> has passed, the stored variable will be
|
||||
expunged from the cache (on the next request). If no <parameter>ttl</parameter>
|
||||
is supplied (or if the <parameter>ttl</parameter> is
|
||||
<literal>0</literal>), the value will persist until it is removed from
|
||||
the cache manually, or otherwise fails to exist in the cache (clear,
|
||||
restart, etc.).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the cached value
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>An <function>apcu_entry</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$config = apcu_entry("config", function($key) {
|
||||
return [
|
||||
"fruit" => apcu_entry("config.fruit", function($key){
|
||||
return [
|
||||
"apples",
|
||||
"pears"
|
||||
];
|
||||
}),
|
||||
"people" => apcu_entry("config.people", function($key){
|
||||
return [
|
||||
"bob",
|
||||
"joe",
|
||||
"niki"
|
||||
];
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
var_dump($config);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
["fruit"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(6) "apples"
|
||||
[1]=>
|
||||
string(5) "pears"
|
||||
}
|
||||
["people"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(3) "bob"
|
||||
[1]=>
|
||||
string(3) "joe"
|
||||
[2]=>
|
||||
string(4) "niki"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_store</function></member>
|
||||
<member><function>apcu_fetch</function></member>
|
||||
<member><function>apcu_delete</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
|
||||
-->
|
125
reference/apcu/functions/apcu-exists.xml
Normal file
125
reference/apcu/functions/apcu-exists.xml
Normal file
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331135 $ -->
|
||||
|
||||
<refentry xml:id="function.apcu-exists" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apcu_exists</refname>
|
||||
<refpurpose>Checks if entry exists</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apcu_exists</methodname>
|
||||
<methodparam><type>mixed</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Checks if one or more APCu entries exist.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>keys</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A <type>string</type>, or an <type>array</type> of strings, that
|
||||
contain keys.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the key exists, otherwise &false; Or if an
|
||||
<type>array</type> was passed to <parameter>keys</parameter>, then
|
||||
an array is returned that contains all existing keys, or an empty
|
||||
array if none exist.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apcu_exists</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fruit = 'apple';
|
||||
$veggie = 'carrot';
|
||||
|
||||
apcu_store('foo', $fruit);
|
||||
apcu_store('bar', $veggie);
|
||||
|
||||
if (apcu_exists('foo')) {
|
||||
echo "Foo exists: ";
|
||||
echo apcu_fetch('foo');
|
||||
} else {
|
||||
echo "Foo does not exist";
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
if (apcu_exists('baz')) {
|
||||
echo "Baz exists.";
|
||||
} else {
|
||||
echo "Baz does not exist";
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
$ret = apcu_exists(array('foo', 'donotexist', 'bar'));
|
||||
var_dump($ret);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Foo exists: apple
|
||||
Baz does not exist
|
||||
array(2) {
|
||||
["foo"]=>
|
||||
bool(true)
|
||||
["bar"]=>
|
||||
bool(true)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apcu_cache_info</function></member>
|
||||
<member><function>apcu_fetch</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
131
reference/apcu/functions/apcu-fetch.xml
Normal file
131
reference/apcu/functions/apcu-fetch.xml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 299728 $ -->
|
||||
<refentry xml:id="function.apcu-fetch" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_fetch</refname>
|
||||
<refpurpose>
|
||||
Fetch a stored variable from the cache
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>apcu_fetch</methodname>
|
||||
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter role="reference">success</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Fetchs an entry from the cache.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>key</parameter> used to store the value (with
|
||||
<function>apcu_store</function>). If an array is passed then each
|
||||
element is fetched and returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>success</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set to &true; in success and &false; in failure.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The stored variable or array of variables on success; &false; on failure
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_fetch</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$bar = 'BAR';
|
||||
apcu_store('foo', $bar);
|
||||
var_dump(apcu_fetch('foo'));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(3) "BAR"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>3.0.17</entry>
|
||||
<entry>
|
||||
The <parameter>success</parameter> parameter was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_store</function></member>
|
||||
<member><function>apcu_delete</function></member>
|
||||
<member><classname>APCUIterator</classname></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
|
||||
-->
|
137
reference/apcu/functions/apcu-inc.xml
Normal file
137
reference/apcu/functions/apcu-inc.xml
Normal file
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 300268 $ -->
|
||||
|
||||
<refentry xml:id="function.apcu-inc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>apcu_inc</refname>
|
||||
<refpurpose>Increase a stored number</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apcu_inc</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>step</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter role="reference">success</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Increases a stored number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key of the value being increased.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>step</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The step, or value to increase.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>success</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally pass the success or fail boolean value to
|
||||
this referenced variable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the current value of <parameter>key</parameter>'s value on success,
|
||||
&return.falseforfailure;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>apcu_inc</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
echo "Let's do something with success", PHP_EOL;
|
||||
|
||||
apcu_store('anumber', 42);
|
||||
|
||||
echo apcu_fetch('anumber'), PHP_EOL;
|
||||
|
||||
echo apcu_inc('anumber'), PHP_EOL;
|
||||
echo apcu_inc('anumber', 10), PHP_EOL;
|
||||
echo apcu_inc('anumber', 10, $success), PHP_EOL;
|
||||
|
||||
var_dump($success);
|
||||
|
||||
echo "Now, let's fail", PHP_EOL, PHP_EOL;
|
||||
|
||||
apcu_store('astring', 'foo');
|
||||
|
||||
$ret = apcu_inc('astring', 1, $fail);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($fail);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
42
|
||||
43
|
||||
53
|
||||
63
|
||||
bool(true)
|
||||
Now, let's fail
|
||||
|
||||
bool(false)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>apcu_dec</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
118
reference/apcu/functions/apcu-sma-info.xml
Normal file
118
reference/apcu/functions/apcu-sma-info.xml
Normal file
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 297028 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.apcu-sma-info">
|
||||
<refnamediv>
|
||||
<refname>apcu_sma_info</refname>
|
||||
<refpurpose>
|
||||
Retrieves APCu Shared Memory Allocation information
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>apcu_sma_info</methodname>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>limited</parameter><initializer>false</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retrieves APCu Shared Memory Allocation information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>limited</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When set to &false; (default) <function>apcu_sma_info</function> will
|
||||
return a detailed information about each segment.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Array of Shared Memory Allocation data; &false; on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_sma_info</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(apcu_sma_info());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[num_seg] => 1
|
||||
[seg_size] => 31457280
|
||||
[avail_mem] => 31448408
|
||||
[block_lists] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[size] => 31448408
|
||||
[offset] => 8864
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>
|
||||
<link linkend="apcu.configuration">APCu configuration directives</link>
|
||||
</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
|
||||
-->
|
147
reference/apcu/functions/apcu-store.xml
Normal file
147
reference/apcu/functions/apcu-store.xml
Normal file
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331388 $ -->
|
||||
<refentry xml:id="function.apcu-store" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>apcu_store</refname>
|
||||
<refpurpose>
|
||||
Cache a variable in the data store
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>apcu_store</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>apcu_store</methodname>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>unused</parameter><initializer>NULL</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>ttl</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Cache a variable in the data store.
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
Unlike many other mechanisms in PHP, variables stored using
|
||||
<function>apcu_store</function> will persist between requests (until the
|
||||
value is removed from the cache).
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Store the variable using this name. <parameter>key</parameter>s are
|
||||
cache-unique, so storing a second value with the same
|
||||
<parameter>key</parameter> will overwrite the original value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ttl</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Time To Live; store <parameter>var</parameter> in the cache for
|
||||
<parameter>ttl</parameter> seconds. After the
|
||||
<parameter>ttl</parameter> has passed, the stored variable will be
|
||||
expunged from the cache (on the next request). If no <parameter>ttl</parameter>
|
||||
is supplied (or if the <parameter>ttl</parameter> is
|
||||
<literal>0</literal>), the value will persist until it is removed from
|
||||
the cache manually, or otherwise fails to exist in the cache (clear,
|
||||
restart, etc.).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Names in key, variables in value.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
Second syntax returns array with error keys.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>apcu_store</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$bar = 'BAR';
|
||||
apcu_store('foo', $bar);
|
||||
var_dump(apcu_fetch('foo'));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(3) "BAR"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>apcu_add</function></member>
|
||||
<member><function>apcu_fetch</function></member>
|
||||
<member><function>apcu_delete</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
|
||||
-->
|
942
reference/apcu/ini.xml
Normal file
942
reference/apcu/ini.xml
Normal file
|
@ -0,0 +1,942 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 331742 $ -->
|
||||
<section xml:id="apcu.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
<para>
|
||||
Although the default APC settings are fine for many installations, serious
|
||||
users should consider tuning the following parameters.
|
||||
</para>
|
||||
<para>
|
||||
There are two primary decisions to be made configuring APC. First,
|
||||
how much memory is going to be allocated to APC; and second, whether APC
|
||||
will check if a file has been modified on every request. The two ini
|
||||
directives that control these settings are <literal>apc.shm_size</literal>
|
||||
and <literal>apc.stat</literal>, respectively. Read the sections on these
|
||||
two directive carefully below.
|
||||
</para>
|
||||
<para>
|
||||
Once the server is running, the <literal>apc.php</literal> script that
|
||||
is bundled with the extension should be copied somewhere into the docroot and
|
||||
viewed with a browser as it provides a detailed analysis of the internal
|
||||
workings of APC. If GD is enabled in PHP, it will even display some
|
||||
interesting graphs. The first thing to ensure, of course, is that it is
|
||||
actually caching files. If APC is working, the <literal>Cache full count
|
||||
</literal> number (on the left) will display the number of times the cache
|
||||
has reached maximum capacity and has had to forcefully clean any entries that
|
||||
haven't been accessed in the last <literal>apc.ttl</literal> seconds. This
|
||||
number is minimized in a well-configured cache. If the cache is constantly
|
||||
being filled, and thusly forcefully freed, the resulting churning will have
|
||||
disparaging effects on script performance. The easiest way to minimize this
|
||||
number is to allocate more memory for APC. Barring that, the <literal>apc.filters
|
||||
</literal> ought to be used to cache fewer scripts.
|
||||
</para>
|
||||
<para>
|
||||
When APC is compiled with mmap support (Memory Mapping), it will use only one
|
||||
memory segment, unlike when APC is built with SHM (SysV Shared Memory) support
|
||||
that uses multiple memory segments. MMAP does not have a maximum limit like SHM
|
||||
does in <literal>/proc/sys/kernel/shmmax</literal>. In general MMAP support is
|
||||
recommeded because it will reclaim the memory faster when the webserver is
|
||||
restarted and all in all reduces memory allocation impact at startup.
|
||||
</para>
|
||||
<para>
|
||||
<table>
|
||||
<title>APCu configuration options</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Name;</entry>
|
||||
<entry>&Default;</entry>
|
||||
<entry>&Changeable;</entry>
|
||||
<entry>&Changelog;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.enabled">apc.enabled</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>PHP_INI_SYSTEM in APC 2. PHP_INI_ALL in APC <= 3.0.12.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.shm-segments">apc.shm_segments</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.shm-size">apc.shm_size</link></entry>
|
||||
<entry>"32M"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.user-entries-hint">apc.user_entries_hint</link></entry>
|
||||
<entry>"4096"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.ttl">apc.ttl</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.user-ttl">apc.user_ttl</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.gc-ttl">apc.gc_ttl</link></entry>
|
||||
<entry>"3600"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.cache-by-default">apc.cache_by_default</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>PHP_INI_SYSTEM in APC <= 3.0.12. Available since APC 3.0.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.filters">apc.filters</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.mmap-file-mask">apc.mmap_file_mask</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.slam-defense">apc.slam_defense</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.0. Prior to APC 3.1.4, the default value was <literal>"0"</literal> (disabled).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.file-update-protection">apc.file_update_protection</link></entry>
|
||||
<entry>"2"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.6.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.enable-cli">apc.enable_cli</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.7.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.max-file-size">apc.max_file_size</link></entry>
|
||||
<entry>"1M"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.7.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.use-request-time">apc.use_request_time</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>Available since APC 3.1.3.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.stat">apc.stat</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.10.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.write-lock">apc.write_lock</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.report-autofilter">apc.report_autofilter</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.serializer">apc.serializer</link></entry>
|
||||
<entry>"default"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.0.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.include-once-override">apc.include_once_override</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.12.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.rfc1867">apc.rfc1867</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.13.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.rfc1867-prefix">apc.rfc1867_prefix</link></entry>
|
||||
<entry>"upload_"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.rfc1867-name">apc.rfc1867_name</link></entry>
|
||||
<entry>"APC_UPLOAD_PROGRESS"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.rfc1867-freq">apc.rfc1867_freq</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.rfc1867-ttl">apc.rfc1867_ttl</link></entry>
|
||||
<entry>"3600"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.localcache">apc.localcache</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available in APC 3.0.14 - 3.1.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.localcache.size">apc.localcache.size</link></entry>
|
||||
<entry>"512"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>vailable in APC 3.0.14 - 3.1.11.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.coredump-unmap">apc.coredump_unmap</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.16.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.stat-ctime">apc.stat_ctime</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.0.13.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.preload-path">apc.preload_path</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.file-md5">apc.file_md5</link></entry>
|
||||
<entry>"0"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.canonicalize">apc.canonicalize</link></entry>
|
||||
<entry>"1"</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.1.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.lazy-functions">apc.lazy_functions</link></entry>
|
||||
<entry>0</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.3.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.apcu.lazy-classes">apc.lazy_classes</link></entry>
|
||||
<entry>0</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
<entry>Available since APC 3.1.3.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
&ini.php.constants;
|
||||
</para>
|
||||
|
||||
&ini.descriptions.title;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="ini.apcu.enabled">
|
||||
<term>
|
||||
<parameter>apc.enabled</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>apc.enabled</literal> can be set to 0 to disable APC. This is
|
||||
primarily useful when APC is statically compiled
|
||||
into PHP, since there is no other way to disable
|
||||
it (when compiled as a DSO, the <literal>extension</literal>
|
||||
line in <literal>php.ini</literal> can just be commented-out).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.shm-segments">
|
||||
<term>
|
||||
<parameter>apc.shm_segments</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of shared memory segments to allocate
|
||||
for the compiler cache. If APC is running out of
|
||||
shared memory but <literal>apc.shm_size</literal>
|
||||
is set as high as the system allows, raising
|
||||
this value might prevent APC from exhausting its memory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.shm-size">
|
||||
<term>
|
||||
<parameter>apc.shm_size</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of each shared memory segment in MB.
|
||||
By default, some systems (including most BSD
|
||||
variants) have very low limits on the size of a
|
||||
shared memory segment.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.shm-strings-buffer">
|
||||
<term>
|
||||
<parameter>apc.shm_strings_buffer</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of memory to use as a shared buffer for strings used internally
|
||||
by APC. Size Should be suffixed by M for megabytes, G for gigabytes.
|
||||
Enabling this option will reduce the amount of memory used per PHP-FPM
|
||||
worker as strings will be stored once rather than for each worker.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.optimization">
|
||||
<term>
|
||||
<parameter>apc.optimization</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The optimization level. Zero disables the
|
||||
optimizer, and higher values use more aggressive
|
||||
optimizations. Expect very modest speed
|
||||
improvements. This is experimental.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.num-files-hint">
|
||||
<term>
|
||||
<parameter>apc.num_files_hint</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A "hint" about the number of distinct source files
|
||||
that will be included or requested on your web
|
||||
server. Set to zero or omit if unsure;
|
||||
this setting is mainly useful for sites that have
|
||||
many thousands of source files.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.user-entries-hint">
|
||||
<term>
|
||||
<parameter>apc.user_entries_hint</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Just like <link linkend="ini.apcu.num-files-hint">apc.num_files_hint</link>,
|
||||
a "hint" about the number of distinct user cache variables to store.
|
||||
Set to zero or omit if not sure.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.ttl">
|
||||
<term>
|
||||
<parameter>apc.ttl</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of seconds a cache entry is allowed to
|
||||
idle in a slot in case this cache entry slot is
|
||||
needed by another entry. Leaving this at zero
|
||||
means that APC's cache could potentially fill up
|
||||
with stale entries while newer entries won't be
|
||||
cached. In the event of a cache running out of
|
||||
available memory, the cache will be completely
|
||||
expunged if ttl is equal to 0. Otherwise, if the
|
||||
ttl is greater than 0, APC will attempt to remove
|
||||
expired entries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.user-ttl">
|
||||
<term>
|
||||
<parameter>apc.user_ttl</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of seconds a cache entry is allowed to
|
||||
idle in a slot in case this cache entry slot is
|
||||
needed by another entry. Leaving this at zero
|
||||
means that APC's cache could potentially fill up
|
||||
with stale entries while newer entries won't be
|
||||
cached. In the event of a cache running out of
|
||||
available memory, the cache will be completely
|
||||
expunged if ttl is equal to 0. Otherwise, if the
|
||||
ttl is greater than 0, APC will attempt to remove
|
||||
expired entries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.gc-ttl">
|
||||
<term>
|
||||
<parameter>apc.gc_ttl</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of seconds that a cache entry may
|
||||
remain on the garbage-collection list. This value
|
||||
provides a fail-safe in the event that a server
|
||||
process dies while executing a cached source file;
|
||||
if that source file is modified, the memory
|
||||
allocated for the old version will not be
|
||||
reclaimed until this TTL reached. Set to zero to
|
||||
disable this feature.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.cache-by-default">
|
||||
<term>
|
||||
<parameter>apc.cache_by_default</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
On by default, but can be set to off and used in
|
||||
conjunction with positive <literal>apc.filters</literal> so that files
|
||||
are only cached if matched by a positive filter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.filters">
|
||||
<term>
|
||||
<parameter>apc.filters</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A comma-separated list of POSIX extended regular
|
||||
expressions. If any pattern matches the source
|
||||
filename, the file will not be cached. Note that
|
||||
the filename used for matching is the one passed
|
||||
to include/require, not the absolute path. If the
|
||||
first character of the expression is a <literal>+</literal> then the
|
||||
expression will be additive in the sense that any
|
||||
files matched by the expression will be cached, and
|
||||
if the first character is a <literal>-</literal> then anything matched
|
||||
will not be cached. The <literal>-</literal> case is the default, so
|
||||
it can be left off.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.mmap-file-mask">
|
||||
<term>
|
||||
<parameter>apc.mmap_file_mask</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If compiled with MMAP support by using <literal>--enable-mmap</literal>
|
||||
this is the mktemp-style file_mask to pass to the
|
||||
mmap module for determining whether your mmap'ed memory
|
||||
region is going to be file-backed or shared memory
|
||||
backed. For straight file-backed mmap, set it to
|
||||
something like <literal>/tmp/apc.XXXXXX</literal>
|
||||
(exactly 6 <literal>X</literal>s).
|
||||
To use POSIX-style shm_open/mmap put a <literal>.shm</literal>
|
||||
somewhere in your mask. e.g. <literal>/apc.shm.XXXXXX</literal>
|
||||
You can also set it to <literal>/dev/zero</literal> to use your
|
||||
kernel's <literal>/dev/zero</literal> interface to anonymous mmap'ed
|
||||
memory. Leaving it undefined will force an anonymous mmap.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.slam-defense">
|
||||
<term>
|
||||
<parameter>apc.slam_defense</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
On very busy servers whenever you start the server or
|
||||
modify files you can create a race of many processes
|
||||
all trying to cache the same file at the same time.
|
||||
This option sets the percentage of processes that will
|
||||
skip trying to cache an uncached file. Or think of it
|
||||
as the probability of a single process to skip caching.
|
||||
For example, setting <literal>apc.slam_defense</literal>
|
||||
to <literal>75</literal> would mean that there is
|
||||
a 75% chance that the process will not cache an uncached
|
||||
file. So, the higher the setting the greater the defense
|
||||
against cache slams. Setting this to <literal>0</literal>
|
||||
disables this feature.
|
||||
</para>
|
||||
<para>
|
||||
Deprecated by <link linkend="ini.apcu.write-lock">apc.write_lock</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.file-update-protection">
|
||||
<term>
|
||||
<parameter>apc.file_update_protection</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When a file is modified on a live web server it really
|
||||
ought to be done in an atomic manner. That is, written to a
|
||||
temporary file and renamed (<literal>mv</literal>) the file into its
|
||||
permanent position when it is ready. Many text editors,
|
||||
<command>cp</command>, <command>tar</command> and
|
||||
other such programs don't do this. This means that there
|
||||
is a chance that a file is accessed (and cached) while it
|
||||
is still being written to. This <literal>apc.file_update_protection</literal>
|
||||
setting puts a delay on caching brand new files. The
|
||||
default is 2 seconds, which means that if the modification
|
||||
timestamp (<literal>mtime</literal>) on a file shows that it is less than 2
|
||||
seconds old when it is accessed, it will not be cached.
|
||||
The unfortunate person who accessed this half-written file
|
||||
will still see weirdness, but at least it won't persist.
|
||||
If all of the webserver's files are atomically updated, via
|
||||
some method like <command>rsync</command> (which updates correctly),
|
||||
this protection can be disabled by setting this directive to 0.
|
||||
If the system is flooded with i/o and some update procedures
|
||||
are taking longer than 2 seconds, this setting should be increased
|
||||
to enable the protection on those slower update operations.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.enable-cli">
|
||||
<term>
|
||||
<parameter>apc.enable_cli</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Mostly for testing and debugging. Setting this enables APC
|
||||
for the CLI version of PHP. Under normal circumstances, it is
|
||||
not ideal to create, populate and destroy the APC cache on every
|
||||
CLI request, but for various test scenarios it is useful to be
|
||||
able to enable APC for the CLI version of PHP easily.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.max-file-size">
|
||||
<term>
|
||||
<parameter>apc.max_file_size</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prevent files larger than this value from getting cached. Defaults to
|
||||
1M.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.apcu.stat">
|
||||
<term>
|
||||
<parameter>apc.stat</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Be careful changing this setting. This defaults to on, forcing APC to
|
||||
stat (check) the script on each request to determine if it has been modified.
|
||||
If it has been modified it will recompile and cache the new version.
|
||||
If this setting is off, APC will not check, which usually means that to
|
||||
force APC to recheck files, the web server will have to be restarted or the
|
||||
cache will have to be manually cleared. Note that FastCGI web server configurations
|
||||
may not clear the cache on restart. On a production server where the
|
||||
script files rarely change, a significant performance boost can be
|
||||
achieved by disabled stats.
|
||||
</para>
|
||||
<para>
|
||||
For included/required files this option applies as well, but note that
|
||||
for relative path includes (any path that doesn't start
|
||||
with / on Unix) APC has to check in order to uniquely identify the file.
|
||||
If you use absolute path includes APC can skip the stat and use that
|
||||
absolute path as the unique identifier for the file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.write-lock">
|
||||
<term>
|
||||
<parameter>apc.write_lock</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
On busy servers, when the web server is first started, or when many files
|
||||
have been modified at the same time, APC may try to compile and cache the
|
||||
same file multiple times. Write_lock guarantees that only one process
|
||||
will attempt to compile and cache an uncached script. The other processes
|
||||
attempting to use the script will run without using the opcode cache, rather
|
||||
than locking and waiting for the cache to prime.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.report-autofilter">
|
||||
<term>
|
||||
<parameter>apc.report_autofilter</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Logs any scripts that were automatically excluded from being cached due
|
||||
to early/late binding issues.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.serializer">
|
||||
<term>
|
||||
<parameter>apc.serializer</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used to configure APC to use a third party serializer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.include-once-override">
|
||||
<term>
|
||||
<parameter>apc.include_once_override</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optimize <function>include_once</function> and <function>require_once</function>
|
||||
calls and avoid the expensive system calls used.
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
This feature is <emphasis>EXPERIMENTAL</emphasis>. The behaviour of this
|
||||
directive, its name, and surrounding documentation may change without
|
||||
notice in a future release of APC. This feature should be used at your
|
||||
own risk.
|
||||
</simpara>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.rfc1867">
|
||||
<term>
|
||||
<parameter>apc.rfc1867</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
RFC1867 File Upload Progress hook handler is only available if APC
|
||||
was compiled against PHP 5.2.0 or later. When enabled, any file uploads
|
||||
which includes a field called <literal>APC_UPLOAD_PROGRESS</literal>
|
||||
before the file field in an upload form will cause APC to automatically
|
||||
create an upload_<emphasis>key</emphasis> user cache entry where
|
||||
<emphasis>key</emphasis> is the value of the
|
||||
<literal>APC_UPLOAD_PROGRESS</literal> form entry.
|
||||
</para>
|
||||
<para>
|
||||
Note that the hidden field specified by
|
||||
<literal>APC_UPLOAD_PROGRESS</literal> must come before the file field,
|
||||
otherwise the upload progress will not work correctly.
|
||||
</para>
|
||||
<para>
|
||||
Note that the file upload tracking is not threadsafe at this point, so
|
||||
new uploads that happen while a previous one is still going will disable
|
||||
the tracking for the previous.
|
||||
</para>
|
||||
<para>
|
||||
Note that the <literal>rate</literal> is only available once all file
|
||||
transfers are completed.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>An apc.rfc1867 example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(apc_fetch("upload_$_POST[APC_UPLOAD_PROGRESS]"));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[total] => 1142543
|
||||
[current] => 1142543
|
||||
[rate] => 1828068.8
|
||||
[filename] => test
|
||||
[name] => file
|
||||
[temp_filename] => /tmp/php8F
|
||||
[cancel_upload] => 0
|
||||
[done] => 1
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.rfc1867-prefix">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_prefix</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Key prefix to use for the user cache entry generated by rfc1867 upload
|
||||
progress functionality.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.rfc1867-name">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_name</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the hidden form entry name that activates APC upload progress
|
||||
and specifies the user cache key suffix.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.rfc1867-freq">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_freq</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The frequency that updates should be made to the user cache entry for
|
||||
upload progress. This can take the form of a percentage of the total
|
||||
file size or a size in bytes optionally suffixed with
|
||||
<literal>"k"</literal>, <literal>"m"</literal>, or <literal>"g"</literal>
|
||||
for kilobytes, megabytes, or gigabytes respectively (case insensitive).
|
||||
A setting of 0 updates as often as possible, which may cause slower
|
||||
uploads.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.rfc1867-ttl">
|
||||
<term>
|
||||
<parameter>apc.rfc1867_ttl</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<acronym>TTL</acronym> for rfc1867 entries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.localcache">
|
||||
<term>
|
||||
<parameter>apc.localcache</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This enables a lock-free local process shadow-cache which reduces lock
|
||||
contention when the cache is being written to.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.localcache.size">
|
||||
<term>
|
||||
<parameter>apc.localcache.size</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the local process shadow-cache, should be set to a
|
||||
sufficiently large value, approximately half of
|
||||
<link linkend="ini.apcu.num-files-hint">apc.num_files_hint</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.coredump-unmap">
|
||||
<term>
|
||||
<parameter>apc.coredump_unmap</parameter>
|
||||
<type>boolean</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enables APC handling of signals, such as SIGSEGV, that write
|
||||
core files when signaled. When these signals are received,
|
||||
APC will attempt to unmap the shared memory segment in order
|
||||
to exclude it from the core file. This setting may improve
|
||||
system stability when fatal signals are received and a large
|
||||
APC shared memory segment is configured.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This feature is potentially dangerous. Unmapping the shared
|
||||
memory segment in a fatal signal handler may cause undefined
|
||||
behaviour if a fatal error occurs.
|
||||
</para>
|
||||
</warning>
|
||||
<note>
|
||||
<para>
|
||||
Although some kernels may provide a facility to ignore various
|
||||
types of shared memory when generating a core dump file, these
|
||||
implementations may also ignore important shared memory segments
|
||||
such as the Apache scoreboard.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.stat-ctime">
|
||||
<term>
|
||||
<parameter>apc.stat_ctime</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verification with ctime will avoid problems caused by programs such
|
||||
as svn or rsync by making sure inodes haven't changed since the last
|
||||
stat. APC will normally only check mtime.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.canonicalize">
|
||||
<term>
|
||||
<parameter>apc.canonicalize</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If on, then relative paths are canonicalized in no-stat mode. If set,
|
||||
then files included via stream wrappers can not be cached as
|
||||
<function>realpath</function> does not support stream wrappers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.preload-path">
|
||||
<term>
|
||||
<parameter>apc.preload_path</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally, set a path to the directory that APC will load
|
||||
cache data at startup.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.use-request-time">
|
||||
<term>
|
||||
<parameter>apc.use_request_time</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use the <acronym>SAPI</acronym> request start time for
|
||||
<acronym>TTL</acronym>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.file-md5">
|
||||
<term>
|
||||
<parameter>apc.file_md5</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Records a md5 hash of files.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.lazy-functions">
|
||||
<term>
|
||||
<parameter>apc.lazy_functions</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enables lazy loading for functions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.apcu.lazy-classes">
|
||||
<term>
|
||||
<parameter>apc.lazy_classes</parameter>
|
||||
<type>integer</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enables lazy loading for classes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- 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
|
||||
-->
|
31
reference/apcu/reference.xml
Normal file
31
reference/apcu/reference.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 297028 $ -->
|
||||
|
||||
<reference xml:id="ref.apcu" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>APCu &Functions;</title>
|
||||
|
||||
&reference.apcu.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
72
reference/apcu/setup.xml
Normal file
72
reference/apcu/setup.xml
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 304703 $ -->
|
||||
|
||||
<chapter xml:id="apcu.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="apcu.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
<section xml:id="apcu.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
&pecl.moved;
|
||||
</para>
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;apcu">&url.pecl.package;apcu</link>.
|
||||
</para>
|
||||
<para>
|
||||
&pecl.windows.download;
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
On Windows, APC needs a temp path to exist, and be
|
||||
writable by the web server. It checks the TMP, TEMP
|
||||
and USERPROFILE environment variables in that order
|
||||
and finally tries the WINDOWS directory if none of
|
||||
those are set.
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
For more in-depth, highly technical implementation details, see the
|
||||
<link xlink:href="&url.apc.technotes;">
|
||||
developer-supplied TECHNOTES file
|
||||
</link>.
|
||||
</simpara>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
&reference.apcu.ini;
|
||||
|
||||
<section xml:id="apcu.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
40
reference/apcu/versions.xml
Normal file
40
reference/apcu/versions.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 334762 $ -->
|
||||
<!--
|
||||
Do NOT translate this file
|
||||
-->
|
||||
<versions>
|
||||
<function name='apcu_add' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_cache_info' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_cas' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_clear_cache' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_dec' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_delete' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_entry' from='PECL apcu >= 5.1.0'/>
|
||||
<function name='apcu_exists' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_fetch' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_inc' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_sma_info' from='PECL apcu >= 4.0.0'/>
|
||||
<function name='apcu_store' from='PECL apcu >= 4.0.0'/>
|
||||
</versions>
|
||||
|
||||
<!-- 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
|
||||
-->
|
Loading…
Reference in a new issue