8000 feature #28598 [Cache] support configuring multiple Memcached servers… · symfony/framework-bundle@f34ad52 · GitHub
[go: up one dir, main page]

Skip to content

Commit f34ad52

Browse files
committed
feature #28598 [Cache] support configuring multiple Memcached servers 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 ------- 8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN
2 parents a26055f + 7c7c6f6 commit f34ad52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DependencyInjection/Compiler/CachePoolPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static function getServiceProvider(ContainerBuilder $container, $name)
133133
{
134134
$container->resolveEnvPlaceholders($name, null, $usedEnvs);
135135

136-
if ($usedEnvs || preg_match('#^[a-z]++://#', $name)) {
136+
if ($usedEnvs || preg_match('#^[a-z]++:#', $name)) {
137137
$dsn = $name;
138138

139139
if (!$container->hasDefinition($name = '.cache_connection.'.ContainerBuilder::hash($dsn))) {

0 commit comments

Comments
 (0)
0