Explorar el Código

cache 100 pages for 1 week

Daniel Sheffield hace 1 año
padre
commit
0e174a437a
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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'])