diff --git a/webserver.py b/webserver.py index 905d085..77c4847 100644 --- a/webserver.py +++ b/webserver.py @@ -52,13 +52,13 @@ import random from hashes.hashes import hash_list -@lru_cache -def index_footer(): - h1 = random.choice(hash_list) - # Ensure h2 is different from h1 - h2_candidates = [h for h in hash_list if h != h1] - h2 = random.choice(h2_candidates) if h2_candidates else h1 +# Generate hashes only once at server start +H1 = random.choice(hash_list) +H2_CANDIDATES = [h for h in hash_list if h != H1] +H2 = random.choice(H2_CANDIDATES) if H2_CANDIDATES else H1 +# cahcing was a bad, idea, servertime got stuck. it is now a variable ;) +def index_footer(): return f""" """