Fixes for different setting combos

This commit is contained in:
Maximilian Schmeller 2022-09-15 16:17:24 +02:00
parent 7d3e957ed9
commit b456645621
5 changed files with 36 additions and 69 deletions

View file

@ -35,7 +35,11 @@ def parse_as(type, string):
raise ValueError(f"Unknown type {type.__name__}")
def cached(name, function, file_deps: List[str]):
def cached(name, function, file_deps: List[str], disable_cache=False):
if disable_cache:
print(f"[CACHE] Cache disabled for {name}.")
return function()
if not os.path.isdir("cache"):
os.makedirs("cache", exist_ok=True)