diff --git a/qlib/data/cache.py b/qlib/data/cache.py index fbf6e839db..0390d4b4a8 100644 --- a/qlib/data/cache.py +++ b/qlib/data/cache.py @@ -591,7 +591,7 @@ def update(self, sid, cache_uri, freq: str = "day"): self.clear_cache(cp_cache_uri) return 2 - with CacheUtils.writer_lock(self.r, f"{str(C.dpm.get_data_uri())}:expression-{cache_uri}"): + with CacheUtils.writer_lock(self.r, f"{str(C.dpm.get_data_uri(freq))}:expression-{cache_uri}"): with meta_path.open("rb") as f: d = restricted_pickle_load(f) instrument = d["info"]["instrument"] @@ -958,7 +958,7 @@ def update(self, cache_uri, freq: str = "day"): return 2 im = DiskDatasetCache.IndexManager(cp_cache_uri) - with CacheUtils.writer_lock(self.r, f"{str(C.dpm.get_data_uri())}:dataset-{cache_uri}"): + with CacheUtils.writer_lock(self.r, f"{str(C.dpm.get_data_uri(freq))}:dataset-{cache_uri}"): with meta_path.open("rb") as f: d = restricted_pickle_load(f) instruments = d["info"]["instruments"]