Skip to content

Commit

Permalink
SQLite: Removed connection persistence.
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored and dg committed Sep 7, 2015
1 parent a9ff2c1 commit ce04a24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Caching/Storages/SQLiteJournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct($path = ':memory:')
throw new Nette\NotSupportedException('SQLiteJournal requires PHP extension pdo_sqlite which is not loaded.');
}

$this->pdo = new \PDO('sqlite:' . $path, NULL, NULL, [\PDO::ATTR_PERSISTENT => TRUE]);
$this->pdo = new \PDO('sqlite:' . $path);
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
$this->pdo->exec('
PRAGMA foreign_keys = ON;
Expand Down
2 changes: 1 addition & 1 deletion src/Caching/Storages/SQLiteStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SQLiteStorage extends Nette\Object implements Nette\Caching\IStorage

public function __construct($path = ':memory:')
{
$this->pdo = new \PDO('sqlite:' . $path, NULL, NULL, [\PDO::ATTR_PERSISTENT => TRUE]);
$this->pdo = new \PDO('sqlite:' . $path);
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
$this->pdo->exec('
PRAGMA foreign_keys = ON;
Expand Down

0 comments on commit ce04a24

Please sign in to comment.