Compare commits
1 Commits
036e5190f1
...
3917061e28
Author | SHA1 | Date |
---|---|---|
pictuga | 3917061e28 |
|
@ -482,7 +482,7 @@ import sqlite3
|
||||||
|
|
||||||
class SQLiteCache(BaseCache):
|
class SQLiteCache(BaseCache):
|
||||||
def __init__(self, filename=':memory:'):
|
def __init__(self, filename=':memory:'):
|
||||||
self.con = sqlite3.connect(filename or sqlite_default, detect_types=sqlite3.PARSE_DECLTYPES, check_same_thread=False)
|
self.con = sqlite3.connect(filename, detect_types=sqlite3.PARSE_DECLTYPES, check_same_thread=False, isolation_level=None)
|
||||||
|
|
||||||
with self.con:
|
with self.con:
|
||||||
self.con.execute('CREATE TABLE IF NOT EXISTS data (url UNICODE PRIMARY KEY, code INT, msg UNICODE, headers UNICODE, data BLOB, timestamp INT)')
|
self.con.execute('CREATE TABLE IF NOT EXISTS data (url UNICODE PRIMARY KEY, code INT, msg UNICODE, headers UNICODE, data BLOB, timestamp INT)')
|
||||||
|
|
Loading…
Reference in New Issue