Permalink
Browse files

Remove callbacks to speed up saving

  • Loading branch information...
AD7six committed Jan 23, 2015
1 parent 838d233 commit c0ee49fe88c44f582ed7a906b165e8aab82dfad9
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Model/Datasource/Session/DatabaseSession.php
@@ -118,10 +118,11 @@ public function write($id, $data) {
$record = compact('id', 'data', 'expires');
$record[$this->_model->primaryKey] = $id;
$options = array('validate' => false, 'callbacks' => false);
try {
return $this->_model->save($record, array('validate' => false));
return $this->_model->save($record, $options);
} catch (PDOException $e) {
return $this->_model->save($record, array('validate' => false));
return $this->_model->save($record, $options);
}
}

0 comments on commit c0ee49f

Please sign in to comment.