You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnself.conn.execute(f"SELECT 1 FROM kv WHERE key = '{key}' AND updated_at >= DATETIME('now', '-{self.invalidate_hours} hours')").fetchone() isnotNone
36
+
where_clause=""ifself.invalidate_hours==0elsef" AND updated_at >= DATETIME('now', '-{self.invalidate_hours} hours', 'utc')"
37
+
returnself.conn.execute(f"SELECT 1 FROM kv WHERE key = '{key}' {where_clause}").fetchone() isnotNone
25
38
def__getitem__(self, key):
26
39
item=self.conn.execute("SELECT value FROM kv WHERE key = ?", (key,)).fetchone()
0 commit comments