浏览代码

cache 100 pages for 1 week

Daniel Sheffield 1 年之前
父节点
当前提交
0e174a437a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/rest/CachedLoadingPage.py
  2. 1 1
      app/rest/pyapi.py

+ 1 - 1
app/rest/CachedLoadingPage.py

@@ -8,7 +8,7 @@ from time import time
 from threading import Lock
 from typing import Callable, Union
 
-STALE = 10*60
+STALE = 7*24*60*60
 
 class CachedLoadingPage():
     

+ 1 - 1
app/rest/pyapi.py

@@ -41,7 +41,7 @@ def trend_thread(conn, path, forms):
         )).start()
     return cb
 
-PAGE_CACHE = PageCache(10)
+PAGE_CACHE = PageCache(100)
 QUERY_CACHE = QueryCache(None)
 
 @route('/grocery/trend', method=['GET', 'POST'])