From 8e82a6aa48bf1ed6757ad047fb4f1a4b937201d7 Mon Sep 17 00:00:00 2001 From: norohind <60548839+norohind@users.noreply.github.com> Date: Sun, 3 Apr 2022 23:40:35 +0300 Subject: [PATCH] sqlite cache: make key as primary key --- model/sqlite_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/sqlite_cache.py b/model/sqlite_cache.py index 17110f6..15897ca 100644 --- a/model/sqlite_cache.py +++ b/model/sqlite_cache.py @@ -25,7 +25,7 @@ class Cache: self.db.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r)) with self.db: - self.db.execute("create table if not exists cache (key text unique, value text);") + self.db.execute("create table if not exists cache (key text primary key, value text);") def set(self, key, value) -> None: if self.disabled: