stuttter / wp-spider-cache

Your friendly neighborhood caching solution for WordPress
GNU General Public License v2.0
135 stars 17 forks source link

Add support for Memcached SASL #31

Open BrookeDot opened 4 years ago

BrookeDot commented 4 years ago

My Memcached instance is protected with SASL and requires a username and password to access. I connect to my Memcached server outside of WordPress I pass a few extra options to the class to authentication the connection. Typically that connection would look something like this:

$memcache = new Memcached();
$memcache->setOption( Memcached::OPT_BINARY_PROTOCOL, true );
$memcache->setSaslAuthData( "memcached_user", "hunter2" );
$memcache->addServer( '127.0.0.1', 11211 ) or die ("Could not connect");

When I started looking to use Memcache for WordPress there was very little discussion around SASL usage with existing drop-in options. It would be great to see these options added to WP Spider Cache allowing the connection to be made.

When I attempted to install WP Spider Cache I got a 504 timeout in the browser due to the server connection failing authentication to Memcached().

https://twitter.com/BandonRandon/status/1205030715563233281