mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Add shelve-based picture cache implementation
Hopefully, this will fix #394 for real this time, that is, without the need for a messy python executable ship in the app.
This commit is contained in:
@@ -12,9 +12,10 @@ import sqlite3 as sqlite
|
||||
from .cache import string_to_colors, colors_to_string
|
||||
|
||||
class SqliteCache:
|
||||
"""A class to cache picture blocks.
|
||||
"""A class to cache picture blocks in a sqlite backend.
|
||||
"""
|
||||
def __init__(self, db=':memory:'):
|
||||
def __init__(self, db=':memory:', readonly=False):
|
||||
# readonly is not used in the sqlite version of the cache
|
||||
self.dbname = db
|
||||
self.con = None
|
||||
self._create_con()
|
||||
|
||||
Reference in New Issue
Block a user