Ver código fonte

cache 100 pages for 1 week

Daniel Sheffield 1 ano atrás
pai
commit
0e174a437a
2 arquivos alterados com 2 adições e 2 exclusões
  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'])