]> git.scottworley.com Git - paperdoorknob/commitdiff
fetch: Honor Cache-Control headers
authorScott Worley <scottworley@scottworley.com>
Thu, 23 Nov 2023 22:13:05 +0000 (14:13 -0800)
committerScott Worley <scottworley@scottworley.com>
Wed, 20 Dec 2023 01:37:10 +0000 (17:37 -0800)
paperdoorknob.py

index 3aae5382aabda4aabe7328990f224e9b19b2619a..b7e4349b98ab1d97ae2ff0ad6f50e4740bb6440f 100644 (file)
@@ -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)