diff --git a/python/sglang/srt/mem_cache/hicache_storage.py b/python/sglang/srt/mem_cache/hicache_storage.py index 45b26d100..0e4a7184c 100644 --- a/python/sglang/srt/mem_cache/hicache_storage.py +++ b/python/sglang/srt/mem_cache/hicache_storage.py @@ -85,7 +85,7 @@ class HiCacheStorage(ABC): class HiCacheFile(HiCacheStorage): def __init__(self, file_path: str = "/tmp/hicache"): - self.file_path = file_path + self.file_path = os.getenv("SGLANG_HICACHE_FILE_BACKEND_STORAGE_DIR", file_path) tp_rank = get_tensor_model_parallel_rank() tp_size = get_tensor_model_parallel_world_size() self.tp_suffix = f"_{tp_rank}_{tp_size}" if tp_size > 1 else ""