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 ) ?>

+ +
+ +
+
+ + + plugin_constant); ?> +
+ +
+ +
+
+ + + plugin_constant); ?> +
+ diff --git a/wp-ffpc.php b/wp-ffpc.php index 97d793d..ef1da94 100644 --- a/wp-ffpc.php +++ b/wp-ffpc.php @@ -29,6 +29,8 @@ include_once ( 'wp-ffpc-class.php' ); $wp_ffpc_defaults = array ( 'hosts'=>'127.0.0.1:11211', + 'authpass'=>'', + 'authuser'=>'', 'expire'=>300, 'invalidation_method'=>0, 'prefix_meta' =>'meta-', @@ -51,6 +53,6 @@ $wp_ffpc_defaults = array ( 'comments_invalidate' => true, ); -$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.4.0', 'WP-FFPC', $wp_ffpc_defaults, 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC' ); +$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.6.0', 'WP-FFPC', $wp_ffpc_defaults, 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC' ); ?>