1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2026-05-07 03:52:17 +02:00

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.
This commit is contained in:
David Lynch 2026-04-05 23:09:12 -05:00
parent dec30e9639
commit 1eb877bd63

View file

@ -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")