Exemplo n.º 1
0
 /**
  * Do garbage collection for session tracking information.
  */
 public function trackGC()
 {
     $this->_hash->lock($this->_trackID);
     if ($ids = $this->_getTrackIds()) {
         $alter = false;
         foreach (array_keys($ids) as $key) {
             if (!$this->_hash->exists($key)) {
                 unset($ids[$key]);
                 $alter = true;
             }
         }
         if ($alter) {
             $this->_hash->set($this->_trackID, json_encode($ids));
         }
     }
     $this->_hash->unlock($this->_trackID);
 }