/** * Do garbage collection for session tracking information. */ public function trackGC() { $this->_memcache->lock($this->_trackID); $ids = $this->_memcache->get($this->_trackID); if (empty($ids)) { $this->_memcache->unlock($this->_trackID); return; } $tstamp = time() - $this->_params['track_lifetime']; $alter = false; foreach ($ids as $key => $val) { if ($tstamp > $val) { unset($ids[$key]); $alter = true; } } if ($alter) { $this->_memcache->set($this->_trackID, $ids); } $this->_memcache->unlock($this->_trackID); }
/** */ public function lock($key) { $this->_memcache->lock($key); }