Avoid redundant llm cache updates
This commit is contained in:
@@ -18,6 +18,7 @@ from .shared_storage import (
|
||||
set_all_update_flags,
|
||||
clear_all_update_flags,
|
||||
try_initialize_namespace,
|
||||
is_multiprocess,
|
||||
)
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ class JsonKVStorage(BaseKVStorage):
|
||||
|
||||
async def index_done_callback(self) -> None:
|
||||
async with self._storage_lock:
|
||||
if self.storage_updated:
|
||||
if (is_multiprocess and self.storage_updated.value) or (not is_multiprocess and self.storage_updated):
|
||||
data_dict = (
|
||||
dict(self._data) if hasattr(self._data, "_getvalue") else self._data
|
||||
)
|
||||
|
Reference in New Issue
Block a user