diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-08-10 06:17:45 -0400 |
---|---|---|
committer | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-08-10 06:17:45 -0400 |
commit | 386202895f875981accd16ad3ff45d0df24409e7 (patch) | |
tree | 5f0e2e8df0a77d9eb7e01d63f1a1e7dc99e8c319 /modules | |
parent | 08838105923255e66ef0d58115fc9ce671d202ae (diff) |
Add env var for cache file
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/cache.py b/modules/cache.py index 71fe6302..a7cd3aeb 100644 --- a/modules/cache.py +++ b/modules/cache.py @@ -1,11 +1,12 @@ import json
+import os
import os.path
import threading
import time
from modules.paths import data_path, script_path
-cache_filename = os.path.join(data_path, "cache.json")
+cache_filename = os.environ.get('SD_WEBUI_CACHE_FILE', os.path.join(data_path, "cache.json"))
cache_data = None
cache_lock = threading.Lock()
|