Skip to content

Commit 6e0216e

Browse files
author
pulkit
committed
updated to add connections
1 parent 9e3574b commit 6e0216e

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,23 @@ Example:
3636
'memcached' => array(
3737
'default' => 'data1',
3838

39-
'data1' => array(
40-
// cluster
41-
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
42-
array('host' => '127.0.0.1', 'port' => 11212, 'weight' => 100)
43-
),
44-
45-
'data2' => array(
46-
// single node
47-
array('host' => '127.0.0.1', 'port' => 11213, 'weight' => 100),
48-
),
49-
50-
'data3' => array(
51-
// single node
52-
array('host' => '127.0.0.1', 'port' => 11214, 'weight' => 100),
53-
),
39+
'connections' => array(
40+
'data1' => array(
41+
// cluster
42+
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
43+
array('host' => '127.0.0.1', 'port' => 11212, 'weight' => 100)
44+
),
45+
46+
'data2' => array(
47+
// single node
48+
array('host' => '127.0.0.1', 'port' => 11213, 'weight' => 100),
49+
),
50+
51+
'data3' => array(
52+
// single node
53+
array('host' => '127.0.0.1', 'port' => 11214, 'weight' => 100),
54+
)
55+
)
5456
),
5557
```
5658

src/MemcachedManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected function getConfig($name)
131131
// To get the memcached connection configuration, we will just pull each of the
132132
// connection configurations and get the configurations for the given name.
133133
// If the configuration doesn't exist, we'll throw an exception and bail.
134-
$connections = $this->app['config']['cache.memcached'];
134+
$connections = $this->app['config']['cache.memcached.connections'];
135135

136136
if (is_null($config = array_get($connections, $name)))
137137
{

0 commit comments

Comments
 (0)