瀏覽代碼

Added message to the memoize/redis cache.

root 4 年之前
父節點
當前提交
96346373bc
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      messages.py

+ 6 - 1
messages.py

@@ -35,6 +35,10 @@ def get_messages(base):
     messages.reverse()
     return messages
 
[email protected](timeout=60)
+def get_message(base, msgno):
+    message = jammin.read_message(base, msgno)
+    return message
 
 @app.route(base_path + "/list")
 def list_bases():
@@ -104,7 +108,8 @@ def display_message(area, msgno):
             "missing-area.html", base_path=base_path, title="Missing Area"
         )
 
-    message = jammin.read_message(bases[area], msgno)
+    # message = jammin.read_message(bases[area], msgno)
+    message = get_message(bases[area], msgno)
 
     if not message:
         return render_template(