simplify caching

This commit is contained in:
georg.sinn-schirwitz
2025-08-29 16:31:10 +02:00
parent d5f686bf1e
commit 2dac771d47
4 changed files with 102 additions and 17 deletions

View File

@@ -203,7 +203,6 @@ def get_cache_path(url: str) -> str:
def cache_page(url: str, content: str):
"""Cache the page content with a timestamp."""
cache_path = get_cache_path(url)
os.makedirs(os.path.dirname(cache_path), exist_ok=True)
with open(cache_path, "w", encoding="utf-8") as f:
f.write(content)
# Update the file's modification time to the current time