simplify caching
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user