8000 minor #10907 Document the multi-host DSN for Memcache caches (javiere… · symfony/symfony-docs@8cecddd · GitHub
[go: up one dir, main page]

Skip to content

Commit 8cecddd

Browse files
committed
minor #10907 Document the multi-host DSN for Memcache caches (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #10907). Discussion ---------- Document the multi-host DSN for Memcache caches Fixes #10402. Commits ------- 1ae951b Document the multi-host DSN for Memcache caches
2 parents 843a056 + 1ae951b commit 8cecddd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/cache/adapters/memcached_adapter.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ helper method allows creating and configuring a `Memcached`_ class instance usin
6464
// etc...
6565
]);
6666

67+
// a single DSN can define multiple servers using the following syntax:
68+
// host[hostname-or-IP:port] (where port is optional). Sockets must include a trailing ':'
69+
$client = MemcachedAdapter::createConnection(
70+
'memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3'
71+
);
72+
73+
.. versionadded:: 4.2
74+
75+
The option to define multiple servers in a single DSN was introduced in Symfony 4.2.
76+
6777
The `Data Source Name (DSN)`_ for this adapter must use the following format:
6878

6979
.. code-block:: text

0 commit comments

Comments
 (0)
0