-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Define multiple Memcached servers in framework.yaml #27855
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
Comments
I know this is not exactly your suggestion, but did you try creating the provider service directly using |
Yes, I'm creating a connection via service at the moment. Two shortcomings of custom service are:
|
does that work? framework:
cache:
default_memcached_provider: your_memcached_connection_service
can't you use env vars in if those two answers are OK to you, do we still need a config option? (the less options the better usually ;) ) |
See proposal in #28300 (comment) |
Implemented in #28598 |
… in one DSN (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [Cache] support configuring multiple Memcached servers in one DSN | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27855 | License | MIT | Doc PR | symfony/symfony-docs#10402 Useful to reconfigure dynamically an array of memcached servers (eg removing a dead one or adding a new one). DSN format is e.g. `memcached://localhost?host[foo.bar]=3`. To ease generating the DSN programmatically, it works also with `memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3`. The key of the "host" parameter is a "host:port" pair, the value is the weight of the "host:port" pair. Sockets need to be specified with the trailing `:` (as shown in the last example). Commits ------- 8e0605a [Cache] support configuring multiple Memcached servers in one DSN
At the moment it's not possible to define multiple Memcached servers in framework.yaml. Would be useful to extend this ability to be able to do either:
or
The text was updated successfully, but these errors were encountered: