2
2
single: Cache Pool
3
3
single: Memcached Cache
4
4
5
+ .. _memcached-adapter :
6
+
5
7
Memcached Cache Adapter
6
8
=======================
7
9
@@ -10,15 +12,17 @@ Memcached Cache Adapter
10
12
The Memcached adapter was introduced in Symfony 3.3.
11
13
12
14
This adapter stores the values in-memory using one (or more) `Memcached server `_
13
- instances. Unlike the ACPu adapter, and similarly to the Redis adapter, it is
14
- not limited to the current server's shared memory; you can store contents
15
- independent of your PHP environment. The ability to utilize a cluster of servers
16
- to provide redundancy and/or fail-over is also available.
15
+ instances. Unlike the :ref: `APCu adapter <apcu-adapter >`, and similarly to the
16
+ :ref: `Redis adapter <redis-adapter >`, it is not limited to the current server's
17
+ shared memory; you can store contents independent of your PHP environment.
18
+ The ability to utilize a cluster of servers to provide redundancy and/or fail-over
19
+ is also available.
17
20
18
21
.. caution ::
19
22
20
- The `Memcached PHP extension `_ as well as a `Memcached server `_ must be
21
- installed, active, and running to use this adapter.
23
+ **Requirements: ** The `Memcached PHP extension `_ as well as a `Memcached server `_
24
+ must be installed, active, and running to use this adapter. Version ``2.2 `` or
25
+ greater of the `Memcached PHP extension `_ is required for this adapter.
22
26
23
27
This adapter expects a `Memcached `_ instance to be passed as the first
24
28
parameter. A namespace and default cache lifetime can optionally be passed as
@@ -71,7 +75,7 @@ The DSN must include a IP/host (and an optional port) or a socket path, an
71
75
optional username and password (for SASL authentication; it requires that the
72
76
memcached extension was compiled with ``--enable-memcached-sasl ``) and an
73
77
optional weight (for prioritizing servers in a cluster; its value is an integer
74
- between ``0 `` and ``100 `` which defaults to ``XX ``; a higher value means more
78
+ between ``0 `` and ``100 `` which defaults to ``null ``; a higher value means more
75
79
priority).
76
80
77
81
Below are common examples of valid DSNs showing a combination of available values::
@@ -201,7 +205,7 @@ Available Options
201
205
expense of more write traffic.
202
206
203
207
``recv_timeout `` (type: ``int ``, default: ``0 ``)
204
- Specifies he amount of time (in microseconds) before timing out during an outgoing socket (read) operation.
208
+ Specifies the amount of time (in microseconds) before timing out during an outgoing socket (read) operation.
205
209
When the ``no_block `` option isn't enabled, this will allow you to still have timeouts on the reading of data.
206
210
207
211
Valid option values include ``0 `` or *any positive integer *.
@@ -275,7 +279,7 @@ Available Options
275
279
are valid and fit within the design of the protocol being used.
276
280
277
281
.. tip ::
278
- Reference the `Memcached extension `_ 's `predefined constants `_ documentation
282
+ Reference the `Memcached `_ extension 's `predefined constants `_ documentation
279
283
for additional information about the available options.
280
284
281
285
.. _`Transmission Control Protocol (TCP)` : https://en.wikipedia.org/wiki/Transmission_Control_Protocol
0 commit comments