lmcache-cli 0.5.1rc2.dev0__py3-none-any.whl → 0.5.2.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lmcache/_version.py CHANGED
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.5.1rc2.dev0'
22
- __version_tuple__ = version_tuple = (0, 5, 1, 'rc2', 'dev0')
21
+ __version__ = version = '0.5.2.dev0'
22
+ __version_tuple__ = version_tuple = (0, 5, 2, 'dev0')
23
23
 
24
- __commit_id__ = commit_id = 'g6af5f696b'
24
+ __commit_id__ = commit_id = 'g979719d7a'
@@ -710,21 +710,41 @@ class NixlDynamicStorageAgent(NixlStorageAgent):
710
710
  return False
711
711
 
712
712
  def batched_nixl_desc_exists(
713
- self, reg_list: List[tuple[int, int, int, str]]
713
+ self, reg_list: List[tuple[int, int, int, str]], path: Optional[str] = None
714
714
  ) -> int:
715
- """Check if multiple descriptors exist via a single ``query_memory`` call.
715
+ """Check if multiple descriptors exist from the start of ``reg_list``.
716
716
 
717
717
  :param reg_list: List of tuples ``(0, 0, 0, meta_info)`` where
718
718
  *meta_info* is the formatted object-key string.
719
+ :param path: Directory for FILE backends (required for FILE; ignored
720
+ for OBJ). FILE existence is resolved on the filesystem, since NIXL
721
+ ``query_memory`` only answers for object stores.
719
722
  :return: Number of consecutive descriptors that exist from the
720
723
  start of the list.
721
- :raises: No exceptions are raised. Errors from the underlying
722
- ``query_memory`` call are caught internally and logged as
723
- warnings; the method returns ``0`` in that case.
724
+ :raises ValueError: If ``path`` is ``None`` for a FILE backend.
725
+ :raises: Errors from the underlying ``query_memory`` call (OBJ
726
+ backends) are caught internally and logged as warnings; the
727
+ method returns ``0`` in that case.
724
728
  """
725
729
  if not reg_list:
726
730
  return 0
727
731
 
732
+ # FILE backends are not resolvable via NIXL ``query_memory`` (it only
733
+ # answers for object stores), so reuse the single-key
734
+ # ``nixl_desc_exists`` -- which already handles FILE via os.path.exists.
735
+ # Without this, FILE/POSIX dynamic backends always return 0 here, so
736
+ # every batched lookup misses and the cache is never reused.
737
+ if self.mem_type == "FILE":
738
+ if path is None:
739
+ raise ValueError("path must be provided for FILE backends")
740
+ consecutive_count = 0
741
+ for _, _, _, meta_info in reg_list:
742
+ if self.nixl_desc_exists(meta_info, path):
743
+ consecutive_count += 1
744
+ else:
745
+ break
746
+ return consecutive_count
747
+
728
748
  try:
729
749
  resp = self.nixl_agent.query_memory(
730
750
  reg_list, self.backend, mem_type=self.mem_type
@@ -1992,7 +2012,7 @@ class NixlDynamicStorageBackend(NixlStorageBackend):
1992
2012
  reg_list = [(0, 0, 0, self._format_object_key(key)) for key in remaining_keys]
1993
2013
 
1994
2014
  # Use the agent's batched_nixl_desc_exists method
1995
- consecutive_hits = self.agent.batched_nixl_desc_exists(reg_list)
2015
+ consecutive_hits = self.agent.batched_nixl_desc_exists(reg_list, self.path)
1996
2016
 
1997
2017
  # Update cache for the hits and return total count
1998
2018
  for i in range(consecutive_hits):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lmcache-cli
3
- Version: 0.5.1rc2.dev0
3
+ Version: 0.5.2.dev0
4
4
  Summary: A LLM serving engine extension to reduce TTFT and increase throughput, especially under long-context scenarios.
5
5
  Author-email: LMCache Team <lmcacheteam@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  lmcache/__init__.py,sha256=6UD9R4RemwMcaM9AslfldP7zGKMPLceD-8Iv6ovmUZc,4922
2
- lmcache/_version.py,sha256=M85JTOzFe8H27Wm6qQvkdI_1cLuoGdcAhr_eIh9OG0M,551
2
+ lmcache/_version.py,sha256=MVIlL7GZkylnht8j7m5QsKxKBf3EvweGm6i4kQuCYCs,541
3
3
  lmcache/banner.py,sha256=w4LOBKdDDBYF0pdLHFSP1ioUbnkwGGRxTMzBOIaMKiM,4143
4
4
  lmcache/connections.py,sha256=5bSguAPmkJCRpgjkZd0ugGna6Zfm0pXG9vo-RGVXeFg,4965
5
5
  lmcache/logging.py,sha256=7qOcguB6x0mr6TlyWvwcRS3Yk6DVfTq0ZM7ACh5DaT4,2662
@@ -554,7 +554,7 @@ lmcache/v1/storage_backend/hipfile_shim.py,sha256=qdSQGWepK31pDPO9lKqFRRuj3dUKqT
554
554
  lmcache/v1/storage_backend/local_cpu_backend.py,sha256=cpcMMmM1URyxzehN0HRbeJKW6zKJjR-FrexuiGbUC1Q,37015
555
555
  lmcache/v1/storage_backend/local_disk_backend.py,sha256=JyLrk7U_hkF7H6Mjo89AMrfW5sWdxit5TqfpBjLkvW0,22898
556
556
  lmcache/v1/storage_backend/maru_backend.py,sha256=f6xu2WkxWQ8m1QFrP51vB1JTMqtntgB579wWmcBYP1Q,24599
557
- lmcache/v1/storage_backend/nixl_storage_backend.py,sha256=LjeAe-dBwjhacYzwQUJ_GNpi31jqLzORcXao5iHH1A0,78655
557
+ lmcache/v1/storage_backend/nixl_storage_backend.py,sha256=h3xbIFGaVh1d-Xd_LOWkt4Ym4vqTlv5j31JLqLwLwTo,79746
558
558
  lmcache/v1/storage_backend/p2p_backend.py,sha256=Hlo0Rj-ui0FviyAAvUPhIahF1N-WXNYQCWeNmBTXK1s,28249
559
559
  lmcache/v1/storage_backend/path_sharder.py,sha256=g1WqPHN-a-iHQ3Ef7TRrBF0XxeD7EoC4CcUC_sT-tMg,3712
560
560
  lmcache/v1/storage_backend/pd_backend.py,sha256=WUp94oHcY9oIUaTCUOVolSs_6d8ykFJ_95rl27GRWh4,40430
@@ -637,11 +637,11 @@ lmcache/v1/utils/cache_utils.py,sha256=O4RO_BRAOXXPwc3SqV_osq66Rnf6U733gUlbiEHwE
637
637
  lmcache/v1/utils/json_utils.py,sha256=WFrdauddZP8xuOqKqkhFlYyt3cNH-krNtVCRe4jIxeY,1724
638
638
  lmcache/v1/utils/router_discovery.py,sha256=yZR3oTovQesNQzfa6EboyYPj798WVvUxZRJ6l4L-9bk,1867
639
639
  lmcache/v1/utils/subclass_discovery.py,sha256=HmvDIEf8QI7GVeNzD-06zK8McjyX8yFMJNAOaR_85GU,9159
640
- lmcache_cli-0.5.1rc2.dev0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
641
- lmcache_cli-0.5.1rc2.dev0.dist-info/METADATA,sha256=VVmg8e2DLTVmqq438llJ_8ZHvF5Z3I4Xn3CA8MVAYy4,11342
642
- lmcache_cli-0.5.1rc2.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
643
- lmcache_cli-0.5.1rc2.dev0.dist-info/entry_points.txt,sha256=Axef26i3pyPHL-zuNZWCubmM74zLa9tQnoMU1JrAZUg,50
644
- lmcache_cli-0.5.1rc2.dev0.dist-info/scm_file_list.json,sha256=P_pHf7VLZ_Iqnwux7b9ibyYwfhRvbalTXqc9szYikpk,108848
645
- lmcache_cli-0.5.1rc2.dev0.dist-info/scm_version.json,sha256=ZJZ8s6xJ0wg57IOL1WJ7AVip-JOylCp0je6qiPTApQM,162
646
- lmcache_cli-0.5.1rc2.dev0.dist-info/top_level.txt,sha256=7KnuVYNl7HkrnKK3wAN5qJJQSOcCv-l0TW4bzvH_SaU,8
647
- lmcache_cli-0.5.1rc2.dev0.dist-info/RECORD,,
640
+ lmcache_cli-0.5.2.dev0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
641
+ lmcache_cli-0.5.2.dev0.dist-info/METADATA,sha256=ZG0Y_05h7fCYbAF9676guqQxj3qkq8568szcVKubEbQ,11339
642
+ lmcache_cli-0.5.2.dev0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
643
+ lmcache_cli-0.5.2.dev0.dist-info/entry_points.txt,sha256=Axef26i3pyPHL-zuNZWCubmM74zLa9tQnoMU1JrAZUg,50
644
+ lmcache_cli-0.5.2.dev0.dist-info/scm_file_list.json,sha256=P_pHf7VLZ_Iqnwux7b9ibyYwfhRvbalTXqc9szYikpk,108848
645
+ lmcache_cli-0.5.2.dev0.dist-info/scm_version.json,sha256=XF7qKgjqAtNj9W5oPIUhKs502wIeT5BKVQunMyA_US4,159
646
+ lmcache_cli-0.5.2.dev0.dist-info/top_level.txt,sha256=7KnuVYNl7HkrnKK3wAN5qJJQSOcCv-l0TW4bzvH_SaU,8
647
+ lmcache_cli-0.5.2.dev0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (83.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "0.5.1rc1",
2
+ "tag": "0.5.1",
3
3
  "distance": 0,
4
- "node": "g6af5f696b8536cfe63a3b2223af9b916817b917b",
4
+ "node": "g979719d7acb9519fce692aad27ce9b7b579a34ed",
5
5
  "dirty": true,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-07-02"