fix force refresh bug
This commit is contained in:
+2
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user