Skip to content

Commit 1c3a0a0

Browse files
committed
Memcache: Document procedural API (fix #4590)
1 parent e62b1e3 commit 1c3a0a0

18 files changed

+147
-18
lines changed

reference/memcache/memcache/add.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.add" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::add</refname>
6+
<refname>memcache_add</refname>
67
<refpurpose>Add an item to the server</refpurpose>
78
</refnamediv>
89

@@ -15,12 +16,19 @@
1516
<methodparam choice="opt"><type>int</type><parameter>flag</parameter></methodparam>
1617
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
1718
</methodsynopsis>
19+
<methodsynopsis>
20+
<type>bool</type><methodname>memcache_add</methodname>
21+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
22+
<methodparam><type>string</type><parameter>key</parameter></methodparam>
23+
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
24+
<methodparam choice="opt"><type>int</type><parameter>flag</parameter></methodparam>
25+
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
26+
</methodsynopsis>
1827

1928
<para>
2029
<function>Memcache::add</function> stores variable
2130
<parameter>var</parameter> with <parameter>key</parameter> only if such
2231
key doesn't exist at the server yet.
23-
Also you can use <function>memcache_add</function> function.
2432
</para>
2533

2634
</refsect1>

reference/memcache/memcache/addserver.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.addserver" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::addServer</refname>
6+
<refname>memcache_add_server</refname>
67
<refpurpose>Add a memcached server to connection pool</refpurpose>
78
</refnamediv>
89

@@ -20,10 +21,22 @@
2021
<methodparam choice="opt"><type>callable</type><parameter>failure_callback</parameter></methodparam>
2122
<methodparam choice="opt"><type>int</type><parameter>timeoutms</parameter></methodparam>
2223
</methodsynopsis>
24+
<methodsynopsis>
25+
<type>bool</type><methodname>memcache_add_server</methodname>
26+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
27+
<methodparam><type>string</type><parameter>host</parameter></methodparam>
28+
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>11211</initializer></methodparam>
29+
<methodparam choice="opt"><type>bool</type><parameter>persistent</parameter></methodparam>
30+
<methodparam choice="opt"><type>int</type><parameter>weight</parameter></methodparam>
31+
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
32+
<methodparam choice="opt"><type>int</type><parameter>retry_interval</parameter></methodparam>
33+
<methodparam choice="opt"><type>bool</type><parameter>status</parameter></methodparam>
34+
<methodparam choice="opt"><type>callable</type><parameter>failure_callback</parameter></methodparam>
35+
<methodparam choice="opt"><type>int</type><parameter>timeoutms</parameter></methodparam>
36+
</methodsynopsis>
2337

2438
<para>
2539
<function>Memcache::addServer</function> adds a server to the connection pool.
26-
You can also use the <function>memcache_add_server</function> function.
2740
</para>
2841

2942
<para>

reference/memcache/memcache/close.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.close" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::close</refname>
6+
<refname>memcache_close</refname>
67
<refpurpose>Close memcached server connection</refpurpose>
78
</refnamediv>
89

@@ -12,12 +13,15 @@
1213
<type>bool</type><methodname>Memcache::close</methodname>
1314
<void/>
1415
</methodsynopsis>
16+
<methodsynopsis>
17+
<type>bool</type><methodname>memcache_close</methodname>
18+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
19+
</methodsynopsis>
1520

1621
<para>
1722
<function>Memcache::close</function> closes connection to memcached
1823
server. This function doesn't close persistent connections, which are
1924
closed only during web-server shutdown/restart.
20-
Also you can use <function>memcache_close</function> function.
2125
</para>
2226

2327
</refsect1>

reference/memcache/memcache/connect.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.connect" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::connect</refname>
6+
<refname>memcache_connect</refname>
67
<refpurpose>Open memcached server connection</refpurpose>
78
</refnamediv>
89

@@ -14,6 +15,12 @@
1415
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
1516
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
1617
</methodsynopsis>
18+
<methodsynopsis>
19+
<type>Memcache</type><methodname>memcache_connect</methodname>
20+
<methodparam><type>string</type><parameter>host</parameter></methodparam>
21+
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
22+
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
23+
</methodsynopsis>
1724

1825
<para>
1926
<function>Memcache::connect</function> establishes a connection to the
@@ -22,7 +29,6 @@
2229
<function>Memcache::connect</function> will be automatically closed at the
2330
end of script execution. Also you can close it with
2431
<function>Memcache::close</function>.
25-
Also you can use <function>memcache_connect</function> function.
2632
</para>
2733

2834
</refsect1>

reference/memcache/memcache/decrement.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.decrement" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::decrement</refname>
6+
<refname>memcache_decrement</refname>
67
<refpurpose>Decrement item's value</refpurpose>
78
</refnamediv>
89

@@ -13,6 +14,12 @@
1314
<methodparam><type>string</type><parameter>key</parameter></methodparam>
1415
<methodparam choice="opt"><type>int</type><parameter>value</parameter><initializer>1</initializer></methodparam>
1516
</methodsynopsis>
17+
<methodsynopsis>
18+
<type class="union"><type>int</type><type>false</type></type><methodname>memcache_decrement</methodname>
19+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
20+
<methodparam><type>string</type><parameter>key</parameter></methodparam>
21+
<methodparam choice="opt"><type>int</type><parameter>value</parameter><initializer>1</initializer></methodparam>
22+
</methodsynopsis>
1623

1724
<para>
1825
<function>Memcache::decrement</function> decrements value of the
@@ -34,7 +41,6 @@
3441
</note>
3542
<function>Memcache::decrement</function> <emphasis>does not</emphasis>
3643
create an item if it didn't exist.
37-
Also you can use <function>memcache_decrement</function> function.
3844
</para>
3945

4046
</refsect1>

reference/memcache/memcache/delete.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.delete" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::delete</refname>
6+
<refname>memcache_delete</refname>
67
<refpurpose>Delete item from the server</refpurpose>
78
</refnamediv>
89

@@ -13,6 +14,12 @@
1314
<methodparam><type>string</type><parameter>key</parameter></methodparam>
1415
<methodparam choice="opt"><type>int</type><parameter>exptime</parameter><initializer>0</initializer></methodparam>
1516
</methodsynopsis>
17+
<methodsynopsis>
18+
<type>bool</type><methodname>memcache_delete</methodname>
19+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
20+
<methodparam><type>string</type><parameter>key</parameter></methodparam>
21+
<methodparam choice="opt"><type>int</type><parameter>exptime</parameter><initializer>0</initializer></methodparam>
22+
</methodsynopsis>
1623

1724
<para>
1825
<function>Memcache::delete</function> deletes an item with the <parameter>key</parameter>.

reference/memcache/memcache/flush.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.flush" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::flush</refname>
6+
<refname>memcache_flush</refname>
67
<refpurpose>Flush all existing items at the server</refpurpose>
78
</refnamediv>
89

@@ -12,13 +13,16 @@
1213
<type>bool</type><methodname>Memcache::flush</methodname>
1314
<void/>
1415
</methodsynopsis>
16+
<methodsynopsis>
17+
<type>bool</type><methodname>memcache_flush</methodname>
18+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
19+
</methodsynopsis>
1520

1621
<para>
1722
<function>Memcache::flush</function> immediately invalidates all
1823
existing items. <function>Memcache::flush</function> doesn't
1924
actually free any resources, it only marks all the items as expired, so
2025
occupied memory will be overwritten by new items.
21-
Also you can use <function>memcache_flush</function> function.
2226
</para>
2327

2428
</refsect1>

reference/memcache/memcache/get.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.get" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::get</refname>
6+
<refname>memcache_get</refname>
67
<refpurpose>Retrieve item from the server</refpurpose>
78
</refnamediv>
89

@@ -18,6 +19,18 @@
1819
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
1920
<methodparam choice="opt"><type>array</type><parameter role="reference">flags</parameter></methodparam>
2021
</methodsynopsis>
22+
<methodsynopsis>
23+
<type>string</type><methodname>memcache_get</methodname>
24+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
25+
<methodparam><type>string</type><parameter>key</parameter></methodparam>
26+
<methodparam choice="opt"><type>int</type><parameter role="reference">flags</parameter></methodparam>
27+
</methodsynopsis>
28+
<methodsynopsis>
29+
<type>array</type><methodname>memcache_get</methodname>
30+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
31+
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
32+
<methodparam choice="opt"><type>array</type><parameter role="reference">flags</parameter></methodparam>
33+
</methodsynopsis>
2134

2235
<para>
2336
<function>Memcache::get</function> returns previously stored data of

reference/memcache/memcache/getextendedstats.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.getextendedstats" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::getExtendedStats</refname>
6+
<refname>memcache_get_extended_stats</refname>
67
<refpurpose>Get statistics from all servers in pool</refpurpose>
78
</refnamediv>
89

@@ -14,13 +15,19 @@
1415
<methodparam choice="opt"><type>int</type><parameter>slabid</parameter></methodparam>
1516
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>100</initializer></methodparam>
1617
</methodsynopsis>
18+
<methodsynopsis>
19+
<type>array</type><methodname>memcache_get_extended_stats</methodname>
20+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
21+
<methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam>
22+
<methodparam choice="opt"><type>int</type><parameter>slabid</parameter></methodparam>
23+
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>100</initializer></methodparam>
24+
</methodsynopsis>
1725

1826
<para>
1927
<function>Memcache::getExtendedStats</function> returns a two-dimensional
2028
associative array with server statistics. Array keys correspond to
2129
host:port of server and values contain the individual server statistics.
2230
A failed server will have its corresponding entry set to &false;.
23-
You can also use the <function>memcache_get_extended_stats</function> function.
2431
</para>
2532

2633
<note>

reference/memcache/memcache/getserverstatus.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<refentry xml:id="memcache.getserverstatus" xmlns="http://docbook.org/ns/docbook">
44
<refnamediv>
55
<refname>Memcache::getServerStatus</refname>
6+
<refname>memcache_get_server_status</refname>
67
<refpurpose>Returns server status</refpurpose>
78
</refnamediv>
89

@@ -13,11 +14,16 @@
1314
<methodparam><type>string</type><parameter>host</parameter></methodparam>
1415
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>11211</initializer></methodparam>
1516
</methodsynopsis>
17+
<methodsynopsis>
18+
<type>int</type><methodname>memcache_get_server_status</methodname>
19+
<methodparam><type>Memcache</type><parameter>memcache</parameter></methodparam>
20+
<methodparam><type>string</type><parameter>host</parameter></methodparam>
21+
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>11211</initializer></methodparam>
22+
</methodsynopsis>
1623

1724
<para>
1825
<function>Memcache::getServerStatus</function> returns a the servers
19-
online/offline status. You can also use <function>memcache_get_server_status</function>
20-
function.
26+
online/offline status.
2127
</para>
2228

2329
<note>

0 commit comments

Comments
 (0)