add option to clear the image cache

This commit is contained in:
dries.k
2022-12-04 19:55:31 +01:00
parent 12f6e028fb
commit 953e1db6f1
5 changed files with 106 additions and 7 deletions

View File

@@ -32,6 +32,9 @@ class Cache(object):
self.cache_dir = os.path.join(path, "cache")
os.makedirs(self.cache_dir, exist_ok=True)
def directory(self) -> str:
return self.cache_dir
def clear(self):
self.cursor.execute("DELETE FROM cache")
self.database.commit()