From: Scott Worley Date: Thu, 23 Nov 2023 22:13:05 +0000 (-0800) Subject: fetch: Honor Cache-Control headers X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/4c1cf54e0fa588eda9ebee0aa48d1b56c0c3a37f?hp=ba3b7c52144a19a83892638415d2bfdb667888f5 fetch: Honor Cache-Control headers --- diff --git a/paperdoorknob.py b/paperdoorknob.py index 3aae538..b7e4349 100644 --- a/paperdoorknob.py +++ b/paperdoorknob.py @@ -34,7 +34,7 @@ def fetch(url: str, session: requests.Session, timeout: int) -> None: def main() -> None: args = command_line_parser().parse_args() - with requests_cache.CachedSession(args.cache_path) as session: + with requests_cache.CachedSession(args.cache_path, cache_control=True) as session: fetch(args.url, session, args.timeout)