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:
parent
dec30e9639
commit
1eb877bd63
1 changed files with 2 additions and 7 deletions
9
leech.py
9
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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue