From 1eb877bd63e3495ed5ee0dde69470f0300ae5ba6 Mon Sep 17 00:00:00 2001 From: David Lynch Date: Sun, 5 Apr 2026 23:09:12 -0500 Subject: [PATCH] Don't manually vacuum after clearing the cache requests-cache added this itself in 0.5.1, so this has been superfluous for a while. --- leech.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/leech.py b/leech.py index 6333d7c..1241de4 100755 --- a/leech.py +++ b/leech.py @@ -7,7 +7,6 @@ import logging import os import requests import requests_cache -import sqlite3 from click_default_group import DefaultGroup from functools import reduce @@ -138,12 +137,8 @@ def cli(): def flush(verbose): """Flushes the contents of the cache.""" configure_logging(verbose) - requests_cache.install_cache('leech') - requests_cache.clear() - - conn = sqlite3.connect('leech.sqlite') - conn.execute("VACUUM") - conn.close() + session = create_session(True) + session.cache.clear() logger.info("Flushed cache")