public function gcSession($maxLifetime) { $this->db->createCommand()->delete($this->sessionTable, '[[expire]]<:expire', [':expire' => time()])->execute(); return true; }
/** * Session GC (garbage collection) handler. * Do not call this method directly. * @param integer $maxLifetime the number of seconds after which data will be seen as 'garbage' and cleaned up. * @return boolean whether session is GCed successfully */ public function gcSession($maxLifetime) { if ($this->dbSession) { return $this->dbSession->gcSession($maxLifetime); } else { parent::gcSession($maxLifetime); } }