mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix #41454: highlight memcache session handler
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238380 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
bb57388420
commit
4a637dbfdc
2 changed files with 36 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<section xml:id='memcache.constants' xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.constants;
|
||||
<table>
|
||||
<title>MemCache Constants</title>
|
||||
<title>Memcache Constants</title>
|
||||
<tgroup cols='2'>
|
||||
<thead>
|
||||
<row>
|
||||
|
@ -24,6 +24,15 @@
|
|||
<function>Memcache::replace</function>.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<constant xml:id='constantmemcache-have-session'>MEMCACHE_HAVE_SESSION</constant>
|
||||
(<type>integer</type>)
|
||||
</entry>
|
||||
<entry>
|
||||
1 if this Memcache session handler is available, 0 otherwise.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- Purpose: remote.other -->
|
||||
<!-- Membership: pecl, external -->
|
||||
|
||||
|
@ -15,6 +15,10 @@
|
|||
to memcached, highly effective caching daemon, which was especially
|
||||
designed to decrease database load in dynamic web applications.
|
||||
</para>
|
||||
<para>
|
||||
The Memcache module also provides a <link
|
||||
linkend="ref.session">session</link> handler (<literal>memcache</literal>).
|
||||
</para>
|
||||
<para>
|
||||
More information about memcached can be found at <link
|
||||
xlink:href="&url.memcache;">&url.memcache;</link>.
|
||||
|
@ -51,6 +55,12 @@
|
|||
<para>
|
||||
<example>
|
||||
<title>memcache extension overview example</title>
|
||||
<para>
|
||||
In this example, an object is being saved in the cache and then
|
||||
retrieved back. Object and other non-scalar types are serialized
|
||||
before saving, so it's impossible to store resources (i.e. connection
|
||||
identifiers and others) in the cache.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -79,10 +89,20 @@ var_dump($get_result);
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In the above example, an object is being saved in the cache and then
|
||||
retrieved back. Object and other non-scalar types are serialized before
|
||||
saving, so it's impossible to store resources (i.e. connection identifiers
|
||||
and others) in the cache.
|
||||
<example>
|
||||
<title>Using memcache session handler</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$session_save_path = "tcp://$host:$port?persistent=1&weight=2&timeout=2&retry_interval=10, ,tcp://$host:$port ";
|
||||
ini_set('session.save_handler', 'memcache');
|
||||
ini_set('session.save_path', $session_save_path);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in a new issue