Phalcon\Session\Adapter\HandlerSocket::gc PHP Method

gc() public method

public gc ( integer $maxlifetime ) : boolean
$maxlifetime integer
return boolean
    public function gc($maxlifetime)
    {
        $time = date('Y-m-d H:i:s', strtotime("- {$maxlifetime} seconds"));
        $index = $this->hsIndex + 1;
        $this->hs->openIndex($index, $this->options['server']['dbname'], $this->options['server']['dbtable'], self::DB_GC_INDEX, '');
        $this->hs->executeDelete($index, '<', [$time], 1000, 0);
        return true;
    }