Skip to content

Documented the feature to pass options in the memcached DSN #9197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/cache/adapters/memcached_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ helper method allows creating and configuring a `Memcached`_ class instance usin
// pass a single DSN string to register a single server with the client
$client = MemcachedAdapter::createConnection(
'memcached://localhost'
// the DSN can include config options (pass them as a query string):
// 'memcached://localhost:11222?retry_timeout=10'
// 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2'
);

// pass an array of DSN strings to register multiple servers with the client
Expand All @@ -65,6 +68,10 @@ helper method allows creating and configuring a `Memcached`_ class instance usin
// etc...
));

.. versionadded:: 3.4
The feature to pass configuration options in the memcached DSN was
introduced in Symfony 3.4.

The `Data Source Name (DSN)`_ for this adapter must use the following format:

.. code-block:: text
Expand Down