Skip to content

Commit 375d78f

Browse files
committed
Add optional CACHE_LOCATION env var
1 parent 9722bc4 commit 375d78f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

async_substrate_interface/utils/cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
USE_CACHE = True if os.getenv("NO_CACHE") != "1" else False
88
CACHE_LOCATION = (
9-
os.path.expanduser("~/.cache/async-substrate_interface")
9+
os.path.expanduser(
10+
os.getenv("CACHE_LOCATION", "~/.cache/async-substrate_interface")
11+
)
1012
if USE_CACHE
1113
else ":memory:"
1214
)

0 commit comments

Comments
 (0)