diff --git a/wp-ffpc-backend.php b/wp-ffpc-backend.php index c30f401..c26a783 100644 --- a/wp-ffpc-backend.php +++ b/wp-ffpc-backend.php @@ -735,6 +735,10 @@ if (!class_exists('WP_FFPC_Backend')) { /* use binary and not compressed format, good for nginx and still fast */ $this->connection->setOption( Memcached::OPT_COMPRESSION , false ); $this->connection->setOption( Memcached::OPT_BINARY_PROTOCOL , true ); + + if ( version_compare( phpversion( 'memcached' ) , '2.0.0', '>=' ) && ini_get( 'memcached.use_sasl' ) == 1 ) { + $this->connection->setSaslAuthData ( $this->options['authuser'], $this->options['authpass']); + } } /* check if initialization was success or not */ diff --git a/wp-ffpc-class.php b/wp-ffpc-class.php index 83c1310..7d71713 100644 --- a/wp-ffpc-class.php +++ b/wp-ffpc-class.php @@ -631,6 +631,31 @@ if ( ! class_exists( 'WP_FFPC' ) ) { options['persistent'],true); ?> /> plugin_constant); ?> + + options['cache_type'], 'memcached') && extension_loaded ( 'memcached' ) && version_compare( phpversion( 'memcached' ) , '2.0.0', '>=' ) ) { ?> + options['authuser'] ) || !empty( $this->options['authpass'] ) ) ) { ?> +
plugin_constant ) ?>