Correct Memcached config in example

Unlike Libmemcached, the Memcached backend server config must be nested inside an array() with a single key 'servers' - otherwise the default host of 127.0.0.1 is used.

array(
	'servers' => array(
		'host' => 'localhost', 
		'port' => 11211, 
		'persistent' => true, 
		'weight' => 1, 
		'timeout' => 1,
		'retry_interval' => 15, 
		'status' => true, 
		'failure_callback' => ''
	)
)
This commit is contained in:
Stuart 2015-07-11 23:18:18 +12:00
parent 0012bc68c4
commit d6cb2419b8

View File

@ -117,6 +117,7 @@ To use this backend, you need a memcached daemon and the memcache PECL extension
'primary_memcached', 'primary_memcached',
'Memcached', 'Memcached',
array( array(
'servers' => array(
'host' => 'localhost', 'host' => 'localhost',
'port' => 11211, 'port' => 11211,
'persistent' => true, 'persistent' => true,
@ -126,6 +127,7 @@ To use this backend, you need a memcached daemon and the memcache PECL extension
'status' => true, 'status' => true,
'failure_callback' => '' 'failure_callback' => ''
) )
)
); );
SS_Cache::pick_backend('primary_memcached', 'any', 10); SS_Cache::pick_backend('primary_memcached', 'any', 10);