update
This commit is contained in:
@@ -11,7 +11,15 @@ import orderankings as odrk
|
||||
from config import CONFIG, DATABASE_CFG, VENV_HOME, DATABASE_FILE
|
||||
|
||||
# persistent memoïzation
|
||||
memory = Memory(f"{VENV_HOME}/src/cache")
|
||||
if CONFIG["persistent_query_memoization"]:
|
||||
memory = Memory(f"{VENV_HOME}/src/cache")
|
||||
else:
|
||||
# if memoïzation is disabled, then just use the false memoization decorator
|
||||
class FalseMemory:
|
||||
def cache(self, func):
|
||||
"""This is a decorator that does nothing to its function."""
|
||||
return func
|
||||
memory = FalseMemory()
|
||||
|
||||
VERBOSE = CONFIG["verbose"]["querying"]
|
||||
|
||||
|
Reference in New Issue
Block a user