fix force refresh bug

This commit is contained in:
2026-05-27 11:23:23 +02:00
parent 5c170a195e
commit 7f5b144cff
6 changed files with 281 additions and 15 deletions
+2 -2
View File
@@ -279,7 +279,7 @@ def get_html_files(directory=HTML_DIR):
return html_files
_index_cache = {"content": None, "timestamp": 0}
INDEX_CACHE_TTL = 300 # 300/60 = 5min
INDEX_CACHE_TTL = 10 # 300/60 = 5min
def build_index_page(force_refresh: bool = False) -> str:
"""Build index page with caching"""
@@ -460,7 +460,7 @@ class WebServerHTTPRequestHandler(BaseHTTPRequestHandler):
# Handle root/index with caching
if req_path == "" or req_path == "index.html":
content = build_index_page()
content = build_index_page(True)
self._send_compressed_response(
content.encode("utf-8"),
"text/html",