MDL-47000 session: Update memcached version referecnes to 2.2.0

This commit is contained in:
Eric Merrill 2015-02-24 15:18:15 -05:00
parent 95751e81ac
commit 774c00c740
2 changed files with 4 additions and 4 deletions

View file

@ -242,7 +242,7 @@ $CFG->admin = 'admin';
// $CFG->session_memcached_save_path = '127.0.0.1:11211'; // $CFG->session_memcached_save_path = '127.0.0.1:11211';
// $CFG->session_memcached_prefix = 'memc.sess.key.'; // $CFG->session_memcached_prefix = 'memc.sess.key.';
// $CFG->session_memcached_acquire_lock_timeout = 120; // $CFG->session_memcached_acquire_lock_timeout = 120;
// $CFG->session_memcached_lock_expire = 7200; // Ignored if memcached extension <= 2.1.0 // $CFG->session_memcached_lock_expire = 7200; // Ignored if PECL memcached is below version 2.2.0
// //
// Memcache session handler (requires memcached server and memcache extension): // Memcache session handler (requires memcached server and memcache extension):
// $CFG->session_handler_class = '\core\session\memcache'; // $CFG->session_handler_class = '\core\session\memcache';

View file

@ -44,7 +44,7 @@ class memcached extends handler {
protected $acquiretimeout = 120; protected $acquiretimeout = 120;
/** /**
* @var int $lockexpire how long to wait before expiring the lock so that other requests * @var int $lockexpire how long to wait before expiring the lock so that other requests
* may continue execution, ignored if memcached <= 2.1.0. * may continue execution, ignored if PECL memcached is below version 2.2.0.
*/ */
protected $lockexpire = 7200; protected $lockexpire = 7200;
@ -86,7 +86,7 @@ class memcached extends handler {
* @return bool success * @return bool success
*/ */
public function start() { public function start() {
// NOTE: memcached <= 2.1.0 expires session locks automatically after max_execution_time, // NOTE: memcached before 2.2.0 expires session locks automatically after max_execution_time,
// this leads to major difference compared to other session drivers that timeout // this leads to major difference compared to other session drivers that timeout
// and stop the second request execution instead. // and stop the second request execution instead.
@ -119,7 +119,7 @@ class memcached extends handler {
ini_set('memcached.sess_prefix', $this->prefix); ini_set('memcached.sess_prefix', $this->prefix);
ini_set('memcached.sess_locking', '1'); // Locking is required! ini_set('memcached.sess_locking', '1'); // Locking is required!
// Try to configure lock and expire timeouts - ignored if memcached <=2.1.0. // Try to configure lock and expire timeouts - ignored if memcached is before version 2.2.0.
ini_set('memcached.sess_lock_max_wait', $this->acquiretimeout); ini_set('memcached.sess_lock_max_wait', $this->acquiretimeout);
ini_set('memcached.sess_lock_expire', $this->lockexpire); ini_set('memcached.sess_lock_expire', $this->lockexpire);
} }