diff --git a/src/Drivers/SQLite.php b/src/Drivers/SQLite.php index 9d48003..253a9bf 100644 --- a/src/Drivers/SQLite.php +++ b/src/Drivers/SQLite.php @@ -77,12 +77,12 @@ public function __construct($options) public function put($key, $value, $time) { - $time += time(); - if ($this->has($key)) { $this->remove($key); } + $time = $time > 0 ? $time + time() : $time; + $stmt = $this->db->prepare("INSERT INTO \"$this->table_name\" VALUES (?, ?, ?)"); $stmt->bindParam(1, $key, SQLITE3_TEXT);