Open szepeviktor opened 10 years ago
Thanks for the suggestion! Can you give me more information about what would be needed to support the service? Does it make sense to shoehorn this support into this library, or would it make more sense to build a separate library?
I think it is a oneliner: http://php.net/manual/en/memcached.setsaslauthdata.php
And the missing doc: http://php.net/manual/en/book.memcached.php#110988 Actually it is a 3-liner
In response to your comment on #33, I think we'd need to update the $memcached_servers
global variable in the wp-config.php file. Then in WP_Object_Cache::__construct()
, we need to read in the auth variables and connect to the remote Memcached instance.
Yes
define('MEMCACHE_SERVERS', serialize(array(
array(
'127.0.0.1',
11211,
'username',
'passw0'
),
array(
'domain.com',
11211,
'username',
'passw0'
)
)));
$memcache_servers = unserialize(MEMCACHE_SERVERS);
// in a loop
if (isset($memcache_servers[$i][3])) {
// need to auth
}
@szepeviktor If you would like to work on a pull request for this feature, I would be happy to consider it. I am not particularly motivated to add SASL support at this time as I am not convinced it is very useful. I have no aversion to accepting a good PR; rather, I just do not feel motivated to investigate and implement the SASL connection.
Please consider supporting http://redislabs.com/memcached-cloud Redis Labs needs SASL auth for memcached.
Thank you!!