Skip to content

Commit 683dab4

Browse files
hzh0425narutolhy
authored andcommitted
feat(hicache): support file backend reading directory config form env. (sgl-project#8498)
1 parent fd165b6 commit 683dab4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/sglang/srt/mem_cache/hicache_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def exists(self, key: str) -> bool:
8585
class HiCacheFile(HiCacheStorage):
8686

8787
def __init__(self, file_path: str = "/tmp/hicache"):
88-
self.file_path = file_path
88+
self.file_path = os.getenv("SGLANG_HICACHE_FILE_BACKEND_STORAGE_DIR", file_path)
8989
tp_rank = get_tensor_model_parallel_rank()
9090
tp_size = get_tensor_model_parallel_world_size()
9191
self.tp_suffix = f"_{tp_rank}_{tp_size}" if tp_size > 1 else ""

0 commit comments

Comments
 (0)