Remove callbacks to speed up saving

This commit is contained in:
AD7six 2015-01-23 08:30:26 +00:00
parent 838d23300b
commit c0ee49fe88

View file

@ -118,10 +118,11 @@ class DatabaseSession implements CakeSessionHandlerInterface {
$record = compact('id', 'data', 'expires'); $record = compact('id', 'data', 'expires');
$record[$this->_model->primaryKey] = $id; $record[$this->_model->primaryKey] = $id;
$options = array('validate' => false, 'callbacks' => false);
try { try {
return $this->_model->save($record, array('validate' => false)); return $this->_model->save($record, $options);
} catch (PDOException $e) { } catch (PDOException $e) {
return $this->_model->save($record, array('validate' => false)); return $this->_model->save($record, $options);
} }
} }