You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`MockL2Adapter`| Python dict key (`dict[ObjectKey, ...]`) |**No change needed.**`__hash__` includes `cache_salt` automatically. With `cache_salt=""` (LRU mode), hashes are unchanged from today. |
741
-
|`NixlStoreL2Adapter`| Python dict key (`dict[ObjectKey, ...]`) |**No change needed.** Same as mock. |
742
-
|`NativeConnectorL2Adapter`| Explicit string serialization via `_object_key_to_string()`: `"{model}@{kv_rank}@{hash}"`|**Must update** to include `cache_salt` for UserLRU. Without the update, different users' keys serialize to the same string → storage collision. |
743
-
744
-
**With regular `LRU` policy (no cache_salt set):** All keys have `cache_salt=""`.
745
-
Even if `_object_key_to_string()` is not updated, there are no collisions
746
-
because all keys share the same empty cache_salt. **Adapters work unchanged.**
747
-
748
-
**With `UserLRU` policy (cache_salt set):** Adapters with explicit string
749
-
serialization (currently only `NativeConnectorL2Adapter`) must include
750
-
`cache_salt` in the serialized form, e.g.:
728
+
-**ObjectKey equality:**`cache_salt` is part of identity (eq/hash). Two
729
+
`ObjectKey`s with different salts are distinct, preventing cross-user
730
+
collisions. With the default `cache_salt=""` all un-salted traffic
731
+
hashes identically (unchanged from the pre-cache_salt adapter).
732
+
-**Serialization format — trailing salt:**``cache_salt`` is appended as
733
+
a 4th field when non-empty; unsalted keys use the 3-field shape, which
734
+
is bit-identical to the pre-cache_salt format:
735
+
751
736
```python
752
737
def_object_key_to_string(key: ObjectKey) -> str:
738
+
base =f"{key.model_name}@{key.kv_rank:08x}@{key.chunk_hash.hex()}"
|`lmcache/v1/distributed/api.py`|`cache_salt: str = ""` on `ObjectKey` with `__post_init__` validation (`@`, `/`, `\`, NUL, length cap on `cache_salt`; `@` rejected on `model_name`); `ipc_key_to_object_keys()` reads `ipc_key.cache_salt` directly (no separate param)|
|`lmcache/v1/multiprocess/server.py`/ `blend_server_v2.py`| No code changes — existing `ipc_key_to_object_keys(key, chunk_hashes)`calls now carry salt automatically|
800
+
|`lmcache/integration/vllm/vllm_multi_process_adapter.py`|Scheduler + worker `_create_key()` now forward `cache_salt` to `IPCCacheEngineKey`|
801
+
|`lmcache/v1/distributed/l2_adapters/native_connector_l2_adapter.py`|`_object_key_to_string()` appends trailing `@<cache_salt>` when salted; un-salted output is unchanged|
802
+
|`lmcache/v1/distributed/l2_adapters/fs_l2_adapter.py`|`_object_key_to_filename()` / `_filename_to_object_key()` accept 3-field (unsalted) or 4-field (salted) shapes|
803
+
|`csrc/storage_backends/fs/connector.cpp`|`key_to_filename()`splits on `@` and dispatches by field count|
0 commit comments